Skip to content
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

Customize response of authentication service #679

gavin771 opened this Issue Jun 6, 2018 · 2 comments


None yet
2 participants
Copy link

gavin771 commented Jun 6, 2018

Steps to reproduce

Try to GET the /authentication route

Expected behavior

I expect that if I add an error section to the hooks of authentication I will be able to catch and customize the response sent to the user, specifically in a json format

Actual behavior

I get an html response of MethodNotAllowed

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working):
"@feathersjs/authentication": "^2.1.5",
"@feathersjs/errors": "^3.3.0",

NodeJS version:


This comment has been minimized.

Copy link

daffl commented Jun 6, 2018

The HTML response is returned by the errorHandler. You will always get a JSON error response if you set the Accept header to application/json or html: false in the error handler configuration.


This comment has been minimized.

Copy link

gavin771 commented Jun 7, 2018

ok thanks

@daffl daffl closed this Jun 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.