Skip to content

Commit a72a3c5

Browse files
committed
docs: clean up README and remove duplicates
1 parent 1339f17 commit a72a3c5

File tree

1 file changed

+3
-32
lines changed

1 file changed

+3
-32
lines changed

README.md

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
[![npm downloads](https://img.shields.io/npm/dm/axios-error-handler-ts.svg)](https://www.npmjs.com/package/axios-error-handler-ts)
66
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
77

8-
A simple and flexible error handler for Axios requests, allowing customizable error messages based on HTTP status codes. It helps manage API error responses by providing clear and customized messages depending on the status code returned by the server.
9-
[![npm version](https://badge.fury.io/js/axios-error-handler-ts.svg)](https://badge.fury.io/js/axios-error-handler-ts)
10-
118
A simple and flexible error handler for Axios requests, allowing customizable error messages based on HTTP status codes. It helps manage API error responses by providing clear and customized messages depending on the status code returned by the server.
129

1310
## Installation
@@ -101,9 +98,7 @@ handleError(error, 403, 'Email or password incorrect.');
10198
#### `errorMessages` (required)
10299

103100
- **Type**: `string | Record<number, string>`
104-
- **Description**: The custom error message(s) for the specified status code(s). If you pass a single string, it will be used for all errors. If passing a `Record<number, string>`, the object keys represent status codes, and values represent corresponding error messages.
105-
106-
If passing a `Record<number, string>`, must not fill `errorCodesToCheck`, the object keys represent status codes and values represent corresponding error messages.
101+
- **Description**: The custom error message(s) for the specified status code(s). If you pass a single string, it will be used for all errors. If passing a `Record<number, string>`, the object keys represent status codes, and values represent corresponding error messages. If passing a `Record<number, string>`, must not fill `errorCodesToCheck`, the object keys represent status codes and values represent corresponding error messages.
107102

108103
#### `errorCodeToCheck` (optional)
109104

@@ -144,33 +139,9 @@ try {
144139
}
145140
```
146141

147-
## Development
148-
149-
To contribute to the project, clone the repository and install dependencies:
150-
151-
```bash
152-
git clone https://github.com/Jszigeti/axios-error-handler.git
153-
cd axios-error-handler
154-
npm install
155-
```
156-
157-
### Running Tests
158-
159-
The project uses Jest for testing. To run the tests, use the following command:
160-
161-
```bash
162-
npm test
163-
```
164-
165-
### Building
166-
167-
To compile the TypeScript code into JavaScript, run:
168-
169-
```bash
170-
npm run build
171-
```
142+
## Contributing
172143

173-
This will generate the compiled code in the `dist` directory. The compiled files are then published to npm instead of the TypeScript source files.
144+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines.
174145

175146
## License
176147

0 commit comments

Comments
 (0)