Skip to main content
1014

Bad Gateway

Sent by: BothRetryable

1014 Bad Gateway is sent when a server acting as a gateway or proxy receives an invalid response from an upstream WebSocket server. This is the WebSocket equivalent of HTTP 502 Bad Gateway. The intermediate server (load balancer, proxy) successfully connected to the backend but the backend returned an invalid or unexpected WebSocket response.

Description

1014 surfaces when WebSocket traffic passes through an intermediary (Nginx as reverse proxy, a cloud load balancer, or a WebSocket proxy) and the upstream server returns an invalid response. The intermediary sends 1014 to the client to indicate the backend failed, not the intermediary itself. Debugging 1014 requires checking the backend server logs, not the proxy.

Common Causes

  • Backend WebSocket server returned invalid response to proxy
  • Upstream WebSocket server crash after proxy connection established
  • Protocol mismatch between proxy and backend

Code

1014

RFC

RFC 6455

Sent By

Both

Retry

Yes