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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to set custom error messages and response formats for auth errors (and others ideally) so they fit the same error format as our api?
Currently the default error message format from key auth plugin is
{"message":"No API Key found in headers, body or querystring"}
Ideally we'd like it to match the standard error format we have, so it would look similar to
{ "error": { "type": "authentication_error", "message": "You did not provide an API key. You need to provide your API key in the X-Authorization header (e.g. 'X-Authorization: YOUR_API_KEY')." }, "status_code": 401 }
Is this possible (without forking Kong and tweaking it + the plugins)?
Cheers
Devan
The text was updated successfully, but these errors were encountered:
Is it possible to set custom error messages and response formats for auth errors (and others ideally) so they fit the same error format as our api?
Currently the default error message format from key auth plugin is
{"message":"No API Key found in headers, body or querystring"}
Ideally we'd like it to match the standard error format we have, so it would look similar to
{ "error": { "type": "authentication_error", "message": "You did not provide an API key. You need to provide your API key in the X-Authorization header (e.g. 'X-Authorization: YOUR_API_KEY')." }, "status_code": 401 }
Is this possible (without forking Kong and tweaking it + the plugins)?
Cheers
Devan
The text was updated successfully, but these errors were encountered: