Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ var err = new createError.NotFound()
|510 |NotExtended |
|511 |NetworkAuthenticationRequired|

## Handling the errors

If used with Express, the [default error handler](https://expressjs.com/en/guide/error-handling.html) will handle errors created using `http-errors` and respond with an appropriate HTML response. If you are developing an API and need to send and handle JSON responses, you might want to create your own error handler, or use a module like [`error-handler-json`](https://github.com/mifi/error-handler-json) (based on the unmaintained [`api-error-handler`](https://github.com/expressjs/api-error-handler) project.)

## License

[MIT](LICENSE)
Expand Down