Closed kkuehlz closed 4 years ago
bug: don't throw h.unauthenticated
When throwing h.unathenticated, hapi will intercept that error, and replace it with its own 500 error:
Debug: internal, implementation, error Error: Cannot throw non-error object
This makes debugging a broken validate function very confusing, because hapi eats "bad token string [..]" error message and replaces it with the above.
Nice catch on this @keur, will merge and publish as a patch.
Published in v6.1.5
bug: don't throw h.unauthenticated
When throwing h.unathenticated, hapi will intercept that error, and replace it with its own 500 error:
Debug: internal, implementation, error Error: Cannot throw non-error object
This makes debugging a broken validate function very confusing, because hapi eats "bad token string [..]" error message and replaces it with the above.