Skip to content

Commit 46696f7

Browse files
authored
📝 Update README
1 parent 7d912cf commit 46696f7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ A simple and flexible error handler for Axios requests, allowing customizable er
66

77
To install `axios-error-handler-ts`, you can use npm or yarn:
88

9-
### Using npm:
9+
### Using npm
1010

1111
```bash
1212
npm install axios-error-handler-ts
1313
```
1414

15-
### Using yarn:
15+
### Using yarn
1616

1717
```bash
1818
yarn add axios-error-handler-ts
@@ -57,8 +57,9 @@ import { handleError } from "axios-error-handler-ts";
5757

5858
// Example function
5959
handleError(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

0 commit comments

Comments
 (0)