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/hooks/instance.ts | |
parent | f7481ba1d8e4575bc534025dbe99f57c6b50102e (diff) | |
download | wallet-core-da93d2ba7eca78359490d5e35b8c70b2bcaf4072.tar.xz |
fix getting wrong error message after 401 response in merchant backoffice
Diffstat (limited to 'packages/merchant-backoffice-ui/src/hooks/instance.ts')
-rw-r--r-- | packages/merchant-backoffice-ui/src/hooks/instance.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/merchant-backoffice-ui/src/hooks/instance.ts b/packages/merchant-backoffice-ui/src/hooks/instance.ts index 8a882218b..eae65d64c 100644 --- a/packages/merchant-backoffice-ui/src/hooks/instance.ts +++ b/packages/merchant-backoffice-ui/src/hooks/instance.ts @@ -205,7 +205,7 @@ export function useInstanceDetails(): HttpResponse< if (isValidating) return { loading: true, data: data?.data }; if (data) return data; - if (error) return error.info; + if (error) return error.cause; return { loading: true }; } @@ -240,7 +240,7 @@ export function useInstanceKYCDetails(): HttpResponse< return { ok: true, data: { type: "redirect", status: data.data } }; return { ok: true, data: { type: "ok" } }; } - if (error) return error.info; + if (error) return error.cause; return { loading: true }; } @@ -268,7 +268,7 @@ export function useManagedInstanceDetails( if (isValidating) return { loading: true, data: data?.data }; if (data) return data; - if (error) return error.info; + if (error) return error.cause; return { loading: true }; } @@ -285,6 +285,6 @@ export function useBackendInstances(): HttpResponse< if (isValidating) return { loading: true, data: data?.data }; if (data) return data; - if (error) return error.info; + if (error) return error.cause; return { loading: true }; } |