eclipse-vertx/vert.x · error
502 Bad Gateway
Error message
502 Bad Gateway
What it means
Constant defining the 502 Bad Gateway response expectation: with expecting(SC_BAD_GATEWAY), a 502 response fails the request future. The server (acting as gateway/proxy) got an invalid upstream response; the 'message' is the reason attached to the expectation failure.
Source
Thrown at vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java:300
/** * Any 5XX server error */ HttpResponseExpectation SC_SERVER_ERRORS = status(500, 600); /** * 500 Internal Server Error */ HttpResponseExpectation SC_INTERNAL_SERVER_ERROR = status(500); /** * 501 Not Implemented */ HttpResponseExpectation SC_NOT_IMPLEMENTED = status(501); /** * 502 Bad Gateway */ HttpResponseExpectation SC_BAD_GATEWAY = status(502); /** * 503 Service Unavailable */ HttpResponseExpectation SC_SERVICE_UNAVAILABLE = status(503); /** * 504 Gateway Timeout */ HttpResponseExpectation SC_GATEWAY_TIMEOUT = status(504); /** * 505 HTTP Version Not Supported */ HttpResponseExpectation SC_HTTP_VERSION_NOT_SUPPORTED = status(505); /** * 506 Variant Also Negotiates (RFC2295)
View on GitHub (pinned to fb308bd8c3)
Solutions
- Retry the request, as 502 is often a transient upstream failure
- Report the upstream problem if it persists
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java:300 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- HTTP status errors: handling 4xx and 5xx responses — how to handle 4xx and 5xx responses properly.
AI-assisted analysis of eclipse-vertx/vert.x@fb308bd8c3 (2026-09-06).
Data as JSON: /api/errors/78a0c888ebf79498.
Report an issue: GitHub.