{"record":{"id":"51daa4ddd5ca8802","repo":"eclipse-vertx/vert.x","slug":"400-bad-request","errorCode":null,"errorMessage":"400 Bad Request","messagePattern":"400 Bad Request","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java","lineNumber":150,"sourceCode":"  /**\n   * 307 Temporary Redirect (since HTTP/1.1)\n   */\n  HttpResponseExpectation SC_TEMPORARY_REDIRECT = status(307);\n\n  /**\n   * 308 Permanent Redirect (RFC7538)\n   */\n  HttpResponseExpectation SC_PERMANENT_REDIRECT = status(308);\n\n  /**\n   * Any 4XX client error\n   */\n  HttpResponseExpectation SC_CLIENT_ERRORS = status(400, 500);\n\n  /**\n   * 400 Bad Request\n   */\n  HttpResponseExpectation SC_BAD_REQUEST = status(400);\n\n  /**\n   * 401 Unauthorized\n   */\n  HttpResponseExpectation SC_UNAUTHORIZED = status(401);\n\n  /**\n   * 402 Payment Required\n   */\n  HttpResponseExpectation SC_PAYMENT_REQUIRED = status(402);\n\n  /**\n   * 403 Forbidden\n   */\n  HttpResponseExpectation SC_FORBIDDEN = status(403);\n\n  /**\n   * 404 Not Found","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java#L132-L168","documentation":"Constant defining the 400 Bad Request response expectation: when applied via expecting(...), a response with status 400 fails the request future instead of being delivered normally. The 'message' is the human-readable reason used in the resulting expectation failure, not a thrown error at a guard site.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java:150 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Handle the failed response future in your expecting() chain","Fix the client request (malformed syntax, bad framing) that triggers 400"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb308bd8c3f12c79f4ae89bef67fadf6c80d036e","analyzedAt":"2026-09-06T11:37:12.241Z","contentChangedAt":"2026-09-06T11:37:12.241Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}