Skip to content

Commit

Permalink
Merge branch 'dev' into feature/error-handle
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene028 authored Aug 22, 2024
2 parents 01f097a + 140dbf4 commit 574b8fa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"nanoid": "^5.0.7",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^4.0.13",
"react-hook-form": "^7.50.1",
"react-router-dom": "^6.22.1",
"react-toastify": "^10.0.4",
Expand Down
10 changes: 9 additions & 1 deletion src/components/ApiErrorBoundary.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import * as Sentry from '@sentry/react';
import { useQueryClient } from '@tanstack/react-query';
import { AxiosError } from 'axios';
Expand Down Expand Up @@ -49,5 +50,12 @@ export default function ApiErrorBoundary({
}
}

return <>{children}</>;
return (
<ErrorBoundary

Check failure on line 54 in src/components/ApiErrorBoundary.tsx

View workflow job for this annotation

GitHub Actions / build

Cannot find name 'ErrorBoundary'. Did you mean 'ApiErrorBoundary'?
{...rest}

Check failure on line 55 in src/components/ApiErrorBoundary.tsx

View workflow job for this annotation

GitHub Actions / build

Cannot find name 'rest'.
onError={(error) => handleError(error as AxiosError)}

Check failure on line 56 in src/components/ApiErrorBoundary.tsx

View workflow job for this annotation

GitHub Actions / build

Parameter 'error' implicitly has an 'any' type.
fallbackRender={() => <NotFoundPage />}>

Check failure on line 57 in src/components/ApiErrorBoundary.tsx

View workflow job for this annotation

GitHub Actions / build

Cannot find name 'NotFoundPage'.
{children}
</ErrorBoundary>

Check failure on line 59 in src/components/ApiErrorBoundary.tsx

View workflow job for this annotation

GitHub Actions / build

Cannot find name 'ErrorBoundary'. Did you mean 'ApiErrorBoundary'?
);
}

0 comments on commit 574b8fa

Please sign in to comment.