diff options
author | Sebastian <sebasjm@gmail.com> | 2023-05-12 11:23:38 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-05-12 11:23:38 -0300 |
commit | da93d2ba7eca78359490d5e35b8c70b2bcaf4072 (patch) | |
tree | 50dbf05271ae43546665d58ab00153fa5e4fd591 /packages/merchant-backoffice-ui/src/InstanceRoutes.tsx | |
parent | f7481ba1d8e4575bc534025dbe99f57c6b50102e (diff) |
fix getting wrong error message after 401 response in merchant backoffice
Diffstat (limited to 'packages/merchant-backoffice-ui/src/InstanceRoutes.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/InstanceRoutes.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx b/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx index 9c50dfe43..cb4abdd40 100644 --- a/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx +++ b/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx @@ -169,14 +169,14 @@ export function InstanceRoutes({ if (error.type === ErrorType.TIMEOUT) { setGlobalNotification({ message: i18n.str`The request to the backend take too long and was cancelled`, - description: i18n.str`Diagnostic from ${error.info?.url} is "${error.message}"`, + description: i18n.str`Diagnostic from ${error.info.url} is "${error.message}"`, type: "ERROR", to, }); } else { setGlobalNotification({ message: i18n.str`The backend reported a problem: HTTP status #${error.status}`, - description: i18n.str`Diagnostic from ${error.info?.url} is '${error.message}'`, + description: i18n.str`Diagnostic from ${error.info.url} is '${error.message}'`, details: error.type === ErrorType.CLIENT || error.type === ErrorType.SERVER ? error.payload.detail @@ -601,12 +601,12 @@ function AdminInstanceUpdatePage({ error.type === ErrorType.TIMEOUT ? { message: i18n.str`The request to the backend take too long and was cancelled`, - description: i18n.str`Diagnostic from ${error.info?.url} is '${error.message}'`, + description: i18n.str`Diagnostic from ${error.info.url} is '${error.message}'`, type: "ERROR" as const, } : { message: i18n.str`The backend reported a problem: HTTP status #${error.status}`, - description: i18n.str`Diagnostic from ${error.info?.url} is '${error.message}'`, + description: i18n.str`Diagnostic from ${error.info.url} is '${error.message}'`, details: error.type === ErrorType.CLIENT || error.type === ErrorType.SERVER |