File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ A simple and flexible error handler for Axios requests, allowing customizable er
66
77To install ` axios-error-handler-ts ` , you can use npm or yarn:
88
9- ### Using npm:
9+ ### Using npm
1010
1111``` bash
1212npm install axios-error-handler-ts
1313```
1414
15- ### Using yarn:
15+ ### Using yarn
1616
1717``` bash
1818yarn add axios-error-handler-ts
@@ -57,8 +57,9 @@ import { handleError } from "axios-error-handler-ts";
5757
5858// Example function
5959handleError (error , " You are not allowed to access this resource." );
60+ // If AxiosError and status === 401: 'You are not allowed to access this resource.'
6061// If AxiosError and status === 403: 'You are not allowed to access this resource.'
61- // If AxiosError and status === 500: 'You are not allowed to access this resource .'
62+ // If AxiosError and status === 500: 'A server error occurred. Please try again later .'
6263```
6364
6465### Server Error Handling
You can’t perform that action at this time.
0 commit comments