Skip to content

Added support for: reject status code and message; context.statusCode. #390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 0 commits into from

Conversation

mrauhu
Copy link

@mrauhu mrauhu commented Feb 11, 2020

Greetings, Guillaume @Akryum.

In this pull request I added support for:

  • reject code set status code and message appends to body:
    // no matched routes
    if (!matchedComponents.length) {
      reject({ code: 404, message: 'Not found' })
    }
  • context.statusCode and example of usage with wildcard * path for creating custom 404 error.

Best wishes,
Sergey.

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.

1 participant