{"record":{"id":"569e7b92f2a0197c","repo":"eclipse-vertx/vert.x","slug":"invalid-index","errorCode":null,"errorMessage":"Invalid index ","messagePattern":"Invalid index ","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/eventbus/ReplyFailure.java","lineNumber":55,"sourceCode":"  RECIPIENT_FAILURE,\n\n  /**\n   * A fatal error occured while delivering the message. Do not retry to send.\n   */\n  ERROR;\n\n  public static ReplyFailure fromInt(int i) {\n    switch (i) {\n      case 0:\n        return TIMEOUT;\n      case 1:\n        return NO_HANDLERS;\n      case 2:\n        return RECIPIENT_FAILURE;\n      case 3:\n        return ERROR;\n      default:\n        throw new IllegalStateException(\"Invalid index \" + i);\n    }\n  }\n\n  public int toInt() {\n    switch (this) {\n      case TIMEOUT:\n        return 0;\n      case NO_HANDLERS:\n        return 1;\n      case RECIPIENT_FAILURE:\n        return 2;\n      case ERROR:\n        return 3;\n      default:\n        throw new IllegalStateException(\"How did we get here?\");\n    }\n  }\n}","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/eventbus/ReplyFailure.java#L37-L73","documentation":"Deserialization guard in ReplyFailure.fromInt: the integer read from the wire (e.g. a clustered event bus reply header) is not one of the mapped codes 0-3 (TIMEOUT, NO_HANDLERS, RECIPIENT_FAILURE, ERROR). The message is a generic sentinel appended with the offending index; this signals a version mismatch or corrupted reply data.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/eventbus/ReplyFailure.java:55 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure all cluster nodes run compatible Vert.x versions","Treat unknown codes as ERROR when consuming untrusted reply data"],"exampleFix":null,"handlingStrategy":"type-guard","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"}