Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Update 505 to 500 in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Casperhr authored Jan 13, 2017
1 parent 1f9b85f commit 8686825
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func postValidate() throws {
```

## Overriding error thrown on failed `init` 🔨
The error thrown by a failed `Node.extract` will be turned into a `505 Internal Server Error` if not caught and changed before being caught by Vapor's AbortMiddleware. By default, this package will catch that error and convert it into a `400 Bad Request`. If you wish to disable this for development environments or throw your own error, you can override the following default implementation:
The error thrown by a failed `Node.extract` will be turned into a `500 Internal Server Error` if not caught and changed before being caught by Vapor's AbortMiddleware. By default, this package will catch that error and convert it into a `400 Bad Request`. If you wish to disable this for development environments or throw your own error, you can override the following default implementation:
```swift
static func updateThrownError(_ error: Error) -> AbortError {
// recreates the default behavior of `AbortMiddleware`.
Expand All @@ -103,4 +103,4 @@ static func updateThrownError(_ error: Error) -> AbortError {
This package is developed and maintained by the Vapor team at [Nodes](https://www.nodes.dk).

## 📄 License
This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)
This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

0 comments on commit 8686825

Please sign in to comment.