Is it possible to customize error response message on tyk cloud? For example, I would like to customize the response message that is generated when rate limit is exceeded. Also, how would I apply changes to a header conditionally? Thanks a lot!
Hello!
Custom error messages available only when using middleware, which is not available on the Cloud.
Regarding changes to a header, can you clarify your use-case?
for example, if i receive a header with x i want it to return y message, but if I receive a header with z I want it to return k message.
Right now it is possible only with middleware.
We have few ideas on how to implement it without mw, like conditional rules in endpoint designer, but its too early to give any ETA.
Leon, Tyk Team
No, it’s not as it has yet to be implemented. You could find out more from your account manager.
The options to customize the error/response message are listed below:
- error templates to globally handle response code returned from upstream or an auth failure
- override messages to globally handle authentication (standard auth and oauth) errors
- custom response plugin to dynamically handle per API definition responses
The first 2 options are not configurable via our SaaS/cloud offering unless a hybrid gateway is deployed