Skip to content

Improve support for custom error handlers#9

Merged
mcollina merged 2 commits intomasterfrom
custom-error-handler
Apr 2, 2019
Merged

Improve support for custom error handlers#9
mcollina merged 2 commits intomasterfrom
custom-error-handler

Conversation

@mcollina
Copy link
Copy Markdown
Member

@mcollina mcollina commented Apr 2, 2019

This is an alternative implementation to solve the same issue of #8. The main difference is that we keep calling next(err), however we set the err.statusCode to 401 now instead of calling reply.code(401). In this way a user can check that property in the custom error handler.

Fixes #8.

@mcollina mcollina requested a review from delvedor April 2, 2019 07:43
Comment thread README.md Outdated
Copy link
Copy Markdown
Member

@delvedor delvedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mcollina mcollina force-pushed the custom-error-handler branch from 00a63cf to e5139bf Compare April 2, 2019 08:50
@mcollina mcollina merged commit a359b24 into master Apr 2, 2019
@mcollina mcollina deleted the custom-error-handler branch April 2, 2019 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants