Reputation: 14317
My REST API returns non-standard HTTP response codes: e.g. 40001, 40002.
It works just fine on local servers, however, when I need to serve them via Amazon ELB (Load Balancer) I get 502 error.
Is there a way to return non-standard HTTP response codes for servers running behind Amazon ELB?
Upvotes: 0
Views: 278
Reputation: 10566
Not all HTTP extensions are supported in the load balancer. You may need to use a TCP listener if the load balancer is not able to terminate the request due to unexpected methods, response codes, or other non-standard HTTP 1.0/1.1 implementations.
So basically, if you want to use non-standard error codes you're probably going to have to go with a TCP listener.
Upvotes: 2