https://serverfault.com/questions/859667/configure-nginx-how-to-handle-500-error-on-upstream-itself-while-nginx-handle
proxy_intercept_errors
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors