Skip to content

Commit

Permalink
Merge pull request #1 from curveballjs/add-mw
Browse files Browse the repository at this point in the history
Add actual mw
  • Loading branch information
evert authored May 4, 2019
2 parents d899934 + 1e5f5e1 commit 27e8081
Show file tree
Hide file tree
Showing 5 changed files with 2,438 additions and 7 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ Typically you will want the problem middleware to be one of the first
middlewares you add to the server. Only exceptions from midddlewares that come
after the problem middleware can be caught.


### Throwing errors

You can throw the following kinds of errors.

* Standard errors. These errors will be anonimized and logged to the console.
a http 500 error gets emitted. (unless debug mode is on).
* Errors with a `httpStatus` property. Any error that's thrown that has a
`httpStatus` property will automatically use that http status. The error
message will be used as a title.
* An error from the [http-errors][3] package.


### Debug mode

By default the middleware will emit a detailed error for any exception that
Expand Down
Loading

0 comments on commit 27e8081

Please sign in to comment.