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/demobank-ui/src/hooks/access.ts | |
parent | f7481ba1d8e4575bc534025dbe99f57c6b50102e (diff) |
fix getting wrong error message after 401 response in merchant backoffice
Diffstat (limited to 'packages/demobank-ui/src/hooks/access.ts')
-rw-r--r-- | packages/demobank-ui/src/hooks/access.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/demobank-ui/src/hooks/access.ts b/packages/demobank-ui/src/hooks/access.ts index 0d4a8bab8..b8b6ab899 100644 --- a/packages/demobank-ui/src/hooks/access.ts +++ b/packages/demobank-ui/src/hooks/access.ts @@ -209,7 +209,7 @@ export function useAccountDetails( }); return clone; } - if (error) return error.info; + if (error) return error.cause; return { loading: true }; } @@ -239,7 +239,7 @@ export function useWithdrawalDetails( // 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 }; } @@ -269,7 +269,7 @@ export function useTransactionDetails( // 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 }; } @@ -307,7 +307,7 @@ export function usePublicAccounts( if (afterData) setLastAfter(afterData); }, [afterData]); - if (afterError) return afterError.info; + if (afterError) return afterError.cause; // if the query returns less that we ask, then we have reach the end or beginning const isReachingEnd = |