-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Using a custom error template error_401.json
does not return the custom error unless the API has "do_not_track": true
set.
What is the expected behavior?
The gateway should respond with custom errors regardless of the tracking status of the API Definition.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
- Create a custom error template
error_403.json
intemplates
:
{
"custom_error": "YOU SHALL NOT PASS!"
}
-
Create a new API that uses token authentication
-
Access that API with a non-existent token:
curl -X GET -H "Authorization: Foo" -H "Content-Type: application/json" http://10.0.75.2:8181/test/get
- Check the error that gets returned, it will be the dfault template, not your custom one.
Which versions of Tyk affected by this issue? Did this work in previous versions of Tyk?
2.2