{"record":{"id":"4c99423ef6bf4992","repo":"eclipse-vertx/vert.x","slug":"403-forbidden","errorCode":null,"errorMessage":"403 Forbidden","messagePattern":"403 Forbidden","errorType":"http","errorClass":null,"httpStatus":403,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java","lineNumber":165,"sourceCode":"  /**\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\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","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java#L147-L183","documentation":"Constant defining the 403 Forbidden response expectation: with expecting(SC_FORBIDDEN), a 403 response fails the request future instead of completing normally. 403 means the server refuses the request despite (or regardless of) authentication; the 'message' is the reason attached to the failure.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java:165 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the client is authorized for the resource","Handle the failed future; do not blindly retry 403 responses"],"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-14T05:17:10.506Z"}