Is your feature request related to a problem? Please describe.
override_messages lets users customize error code and messages globally. While it works with AuthKey and oauth2, it is not supported in JWT auth.
Describe the solution you'd like
Since, for example, I can already set custom errors for AuthKey like this:
{
"override_messages": {
"auth.auth_field_missing": {
"code": 401,
"message": "Authorization field missing"
}
}
}
I want to be able to set custom errors for JWT auth like this:
{
"override_messages": {
"jwt.auth_field_missing": {
"code": 401,
"message": "Authorization field missing"
}
}
}
Additional context
I'll be glad to create a PR if you agree with the enhancement. I won't rehaul all the errors, only the ones that look easily replaceable with standard ones.
Is your feature request related to a problem? Please describe.
override_messageslets users customize error code and messages globally. While it works with AuthKey and oauth2, it is not supported in JWT auth.Describe the solution you'd like
Since, for example, I can already set custom errors for AuthKey like this:
I want to be able to set custom errors for JWT auth like this:
Additional context
I'll be glad to create a PR if you agree with the enhancement. I won't rehaul all the errors, only the ones that look easily replaceable with standard ones.