ExpressGateway / express-gateway

A microservices API Gateway built on top of Express.js
https://www.express-gateway.io
Apache License 2.0
2.97k stars 344 forks source link

add proxy errorAction option to customize proxy error responses #997

Closed gmauricio closed 4 years ago

gmauricio commented 4 years ago

Currently, the proxy policy will just return a text/plain "Bad Gateway." response whenever there's a proxy error, as reported here https://github.com/ExpressGateway/express-gateway/issues/692

This is a proposal of a way to customize error responses, so you can pass an errorAction option to modify the response body and headers when the proxy errors.