{"record":{"id":"96ba4783cc49192f","repo":"eclipse-vertx/vert.x","slug":"reconnect-attempts-must-be-1-96ba47","errorCode":null,"errorMessage":"reconnect attempts must be >= -1","messagePattern":"reconnect attempts must be >= -1","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/net/QuicClientConfig.java","lineNumber":178,"sourceCode":"    return this;\n  }\n\n  /**\n   * @return  the value of reconnect attempts\n   */\n  public int getReconnectAttempts() {\n    return reconnectAttempts;\n  }\n\n  /**\n   * Set the value of reconnect attempts\n   *\n   * @param attempts  the maximum number of reconnect attempts\n   * @return a reference to this, so the API can be used fluently\n   */\n  public QuicClientConfig setReconnectAttempts(int attempts) {\n    if (attempts < -1) {\n      throw new IllegalArgumentException(\"reconnect attempts must be >= -1\");\n    }\n    this.reconnectAttempts = attempts;\n    return this;\n  }\n\n  /**\n   * @return  the value of reconnect interval\n   */\n  public Duration getReconnectInterval() {\n    return reconnectInterval;\n  }\n\n  /**\n   * Set the reconnect interval\n   *\n   * @param interval  the reconnect interval\n   * @return a reference to this, so the API can be used fluently\n   */","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/net/QuicClientConfig.java#L160-L196","documentation":"Configuration validation in QuicClientConfig.setReconnectAttempts: the maximum number of reconnect attempts must be >= -1, where -1 means unlimited retries and 0 means no reconnection. Values below -1 are rejected as meaningless.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/net/QuicClientConfig.java:178 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass -1 (unlimited), 0 (none), or a positive attempt count","Validate configuration values from external sources before applying"],"exampleFix":null,"handlingStrategy":"validation","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"}