{"record":{"id":"97ed50b21f2b8c56","repo":"eclipse-vertx/vert.x","slug":"405-method-not-allowed","errorCode":null,"errorMessage":"405 Method Not Allowed","messagePattern":"405 Method Not Allowed","errorType":"http","errorClass":null,"httpStatus":405,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java","lineNumber":175,"sourceCode":"  /**\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\n   */\n  HttpResponseExpectation SC_NOT_FOUND = status(404);\n\n  /**\n   * 405 Method Not Allowed\n   */\n  HttpResponseExpectation SC_METHOD_NOT_ALLOWED = status(405);\n\n  /**\n   * 406 Not Acceptable\n   */\n  HttpResponseExpectation SC_NOT_ACCEPTABLE = status(406);\n\n  /**\n   * 407 Proxy Authentication Required\n   */\n  HttpResponseExpectation SC_PROXY_AUTHENTICATION_REQUIRED = status(407);\n\n  /**\n   * 408 Request Timeout\n   */\n  HttpResponseExpectation SC_REQUEST_TIMEOUT = status(408);\n\n  /**\n   * 409 Conflict","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java#L157-L193","documentation":"Constant defining the 405 Method Not Allowed response expectation: with expecting(SC_METHOD_NOT_ALLOWED) (as used in HttpTest), a 405 response fails the request future. The server rejected the HTTP method for the target resource; the 'message' is the reason attached to the failure.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java:175 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a method the resource supports (check Allow header)","Handle the failed future rather than repeating the same method"],"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"}