aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/hooks/reserves.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-05-12 11:23:38 -0300
committerSebastian <sebasjm@gmail.com>2023-05-12 11:23:38 -0300
commitda93d2ba7eca78359490d5e35b8c70b2bcaf4072 (patch)
tree50dbf05271ae43546665d58ab00153fa5e4fd591 /packages/merchant-backoffice-ui/src/hooks/reserves.ts
parentf7481ba1d8e4575bc534025dbe99f57c6b50102e (diff)
fix getting wrong error message after 401 response in merchant backoffice
Diffstat (limited to 'packages/merchant-backoffice-ui/src/hooks/reserves.ts')
-rw-r--r--packages/merchant-backoffice-ui/src/hooks/reserves.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/merchant-backoffice-ui/src/hooks/reserves.ts b/packages/merchant-backoffice-ui/src/hooks/reserves.ts
index edcce29cf..bb55b2474 100644
--- a/packages/merchant-backoffice-ui/src/hooks/reserves.ts
+++ b/packages/merchant-backoffice-ui/src/hooks/reserves.ts
@@ -129,7 +129,7 @@ export function useInstanceReserves(): 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 };
}
@@ -154,7 +154,7 @@ export function useReserveDetails(
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 };
}
@@ -176,6 +176,6 @@ export function useTipDetails(
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 };
}