Jitender Singh
07/25/2022, 6:30 AMJan Rehanek
07/25/2022, 12:24 PMJitender Singh
07/25/2022, 1:51 PM{
"abeType": "NAuth",
"cause": {
"message": "Request failed with status code 401",
"name": "Error",
"stack": "Error: Request failed with status code 401\n at createError (<https://localhost.gcp.cwan.cloud:3001/reporting/static/js/vendors~main.chunk.js:1250498:15>)\n at settle (<https://localhost.gcp.cwan.cloud:3001/reporting/static/js/vendors~main.chunk.js:1250732:12>)\n at XMLHttpRequest.onloadend (<https://localhost.gcp.cwan.cloud:3001/reporting/static/js/vendors~main.chunk.js:1249901:7>)",
"config": {
"url": "/api/profile",
"method": "get",
"headers": {
"Accept": "application/json, text/plain, */*",
"X-Requested-With": "XMLHttpRequest"
},
"baseURL": "<https://gooddata-cn-test.cloud>",
"transformRequest": [
null
],
"transformResponse": [
null
],
"timeout": 0,
"withCredentials": true,
"xsrfCookieName": "XSRF-TOKEN",
"xsrfHeaderName": "X-XSRF-TOKEN",
"maxContentLength": -1,
"maxBodyLength": -1,
"transitional": {
"silentJSONParsing": true,
"forcedJSONParsing": true,
"clarifyTimeoutError": false
}
}
},
"authenticationFlow": {
"loginUrl": "/appLogin",
"returnRedirectParam": "redirectTo"
}
}
there is no key which has status codeJan Rehanek
07/26/2022, 2:16 PMNotAuthenticated
) see: https://github.com/gooddata/gooddata-ui-sdk/blob/master/libs/sdk-backend-spi/src/errors/index.ts#L274
Is this sufficient? Or what is the use case for getting the http status? (we have it only in UnexpectedResponseError
)
export function isNotAuthenticated(obj: unknown): obj is NotAuthenticated {