Skip to content

Commit 744520a

Browse files
committed
Do not output duplicate errors, truncate long cell paths
1 parent 3037ee3 commit 744520a

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

MDX2JSON/AbstractREST.cls.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,10 @@ Issue an '500' error and give some indication as to what occurred.<br>
254254
// we are expecting status
255255
#; Set the response Http status
256256
Set %response.Status="500 Internal Server Error"
257-
257+
258+
#; Skip duplicate calls
259+
Quit:$isObject(pStatus) $$$OK
260+
258261
#; Return a helpful error string
259262
Write "{""Error"":"_$$$ZENJSSTR($System.Status.GetErrorText(pStatus,%session.Language))_"}"
260263

MDX2JSON/ResultSet.cls.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,14 @@ Returns array of Axes</Description>
155155
set cell.total = $LG(tNode,8) //COUNT,AVG function
156156
set cell.type = $LG(tNode,1) // mbr,cmbr,lit,exp
157157
set cell.valueID = $LG(tNode,6) // id in mdx dimension for mbr, path for cmbr
158-
set cell.path = ##class(%DeepSee.Query.Engine).%GetSpecForAxisNode(CubeName, QueryKey, AxisNumber, Node) // MDX cell path
159158
set cell.title = $LG(tNode,23)
160159
160+
try {
161+
set cell.path = ##class(%DeepSee.Query.Engine).%GetSpecForAxisNode(CubeName, QueryKey, AxisNumber, Node) // MDX cell path
162+
} catch ex {
163+
set cell.path = "path too long"
164+
}
165+
161166
set cell.headerStyle = $LG(tNode,19)
162167
set cell.cellStyle = $LG(tNode,18)
163168

MDX2JSON/Tests.cls.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ Classes with support methods for testing MDX2JSON</Description>
88

99
<Parameter name="LastCommit">
1010
<Type>%String</Type>
11-
<Default>3bb66d3e2bc6b82d9d6570d9d4107a35dc1878f6</Default>
11+
<Default>3037ee3022e6a49a2cc5003c5e0c8313732b6aef</Default>
1212
</Parameter>
1313

1414
<Parameter name="LastCommitTS">
1515
<Type>%TimeStamp</Type>
16-
<Default>2018-10-17 12:20:48.137</Default>
16+
<Default>2020-04-01 14:52:39.840</Default>
1717
</Parameter>
1818

1919
<Method name="ProjectLength">

0 commit comments

Comments
 (0)