From da93d2ba7eca78359490d5e35b8c70b2bcaf4072 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 12 May 2023 11:23:38 -0300 Subject: fix getting wrong error message after 401 response in merchant backoffice --- packages/demobank-ui/src/hooks/access.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/demobank-ui/src/hooks/access.ts') 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 = -- cgit v1.2.3