{"record":{"id":"9074d3c5bd8e0c80","repo":"eclipse-vertx/vert.x","slug":"406-not-acceptable","errorCode":null,"errorMessage":"406 Not Acceptable","messagePattern":"406 Not Acceptable","errorType":"http","errorClass":null,"httpStatus":406,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java","lineNumber":180,"sourceCode":"  /**\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\n   */\n  HttpResponseExpectation SC_CONFLICT = status(409);\n\n  /**\n   * 410 Gone","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java#L162-L198","documentation":"Constant defining the 406 Not Acceptable response expectation: applying expecting(SC_NOT_ACCEPTABLE) turns a 406 response into a failed request future. The server cannot produce a representation matching the request's Accept headers; the 'message' is the reason on the failure.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/http/HttpResponseExpectation.java:180 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Adjust Accept headers to content types the server supports","Handle the failed future in content-negotiation logic"],"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"}