@topconsultnpm/sdkui-react 6.22.0-dev2.27 → 6.22.0-dev2.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -60,6 +60,9 @@ export const sanitizeException = (exception) => {
|
|
|
60
60
|
catch {
|
|
61
61
|
return exception;
|
|
62
62
|
}
|
|
63
|
+
if (plain && typeof plain === 'object' && !Array.isArray(plain) && plain.message === undefined && typeof exception.message === 'string') {
|
|
64
|
+
plain.message = exception.message;
|
|
65
|
+
}
|
|
63
66
|
return redactSensitiveValue(plain);
|
|
64
67
|
};
|
|
65
68
|
const StyledExeptionToolbar = styled.div `
|
package/lib/helper/helpers.js
CHANGED
|
@@ -821,7 +821,21 @@ export var LandingPages;
|
|
|
821
821
|
// #region Exception
|
|
822
822
|
export function getExceptionMessage(ex) {
|
|
823
823
|
let msg = ex.isApiException ? ex.response.title : ex.message;
|
|
824
|
-
|
|
824
|
+
if (msg !== undefined && msg !== null)
|
|
825
|
+
return msg;
|
|
826
|
+
let asString = ex.toString();
|
|
827
|
+
if (asString !== '[object Object]')
|
|
828
|
+
return asString;
|
|
829
|
+
if (ex.errorMessage)
|
|
830
|
+
return ex.errorMessage;
|
|
831
|
+
if (ex.title)
|
|
832
|
+
return ex.title;
|
|
833
|
+
try {
|
|
834
|
+
return JSON.stringify(ex) ?? asString;
|
|
835
|
+
}
|
|
836
|
+
catch {
|
|
837
|
+
return asString;
|
|
838
|
+
}
|
|
825
839
|
}
|
|
826
840
|
export function getContrastColor(inputColor) {
|
|
827
841
|
let hex = inputColor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topconsultnpm/sdkui-react",
|
|
3
|
-
"version": "6.22.0-dev2.
|
|
3
|
+
"version": "6.22.0-dev2.28",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"lib"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@topconsultnpm/sdk-ts": "6.22.0-dev2.
|
|
42
|
+
"@topconsultnpm/sdk-ts": "6.22.0-dev2.7",
|
|
43
43
|
"@zip.js/zip.js": "2.8.26",
|
|
44
44
|
"buffer": "^6.0.3",
|
|
45
45
|
"devextreme": "^25.2.6",
|