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 Tyk Auth Error Response Messages #2652

Open
sedkis opened this issue Nov 4, 2019 · 2 comments
Open

Customize Tyk Auth Error Response Messages #2652

sedkis opened this issue Nov 4, 2019 · 2 comments
Labels

Comments

@sedkis
Copy link
Contributor

@sedkis sedkis commented Nov 4, 2019

Is your feature request related to a problem? Please describe.
As a user of a front-end application, I am frustrated because when not logged in or using the wrong credentials, I don't get enough information in the error response from the API Gateway.

Describe the solution you'd like
As an API Owner, I'd like to be able to customize the error messages that Tyk will send. I'd like to customize both the Body as well as the Headers.

scenario 1)
IE if my Auth field is missing, I want to redirect to my login screen
modify response code: from 401 to 403
and enter a URL redirect

scenario 2)
IE if my AUTH field is missing, I want to change the body from:

{
"error": "Authorization field missing"
}

to:

{
"error": "You're not logged in. Please try again."
}

I'd like to edit this via the Dashboard. I'm not sure if this is best implemented at an API or Global level.

@sedkis sedkis added the enhancement label Nov 4, 2019
@l3ender

This comment has been minimized.

Copy link

@l3ender l3ender commented Nov 4, 2019

For scenario 1, it'd be nice to be able to change the response code without adding a redirect.

@sedkis

This comment has been minimized.

Copy link
Contributor Author

@sedkis sedkis commented Nov 4, 2019

I agree - what I would hope to see is full customization =
1 input for response code
1 input for response body
1 input for reponse header

things I don't touch stay default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.