From da93d2ba7eca78359490d5e35b8c70b2bcaf4072 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Fri, 12 May 2023 11:23:38 -0300
Subject: fix getting wrong error message after 401 response in merchant
 backoffice

---
 packages/merchant-backoffice-ui/src/InstanceRoutes.tsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'packages/merchant-backoffice-ui/src/InstanceRoutes.tsx')

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
-- 
cgit v1.2.3

