{"record":{"id":"182067a77ae0f810","repo":"eclipse-vertx/vert.x","slug":"querytimeout-must-be-0-182067","errorCode":null,"errorMessage":"queryTimeout must be > 0","messagePattern":"queryTimeout must be > 0","errorType":"exception","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/dns/DnsClientOptions.java","lineNumber":148,"sourceCode":"    return this;\n  }\n\n  /**\n   * @return the query timeout in milliseconds\n   */\n  public long getQueryTimeout() {\n    return queryTimeout;\n  }\n\n  /**\n   * Set the query timeout in milliseconds, i.e the amount of time after a query is considered to be failed.\n   *\n   * @param queryTimeout the query timeout in milliseconds\n   * @return a reference to this, so the API can be used fluently\n   */\n  public DnsClientOptions setQueryTimeout(long queryTimeout) {\n    if (queryTimeout < 1) {\n      throw new IllegalArgumentException(\"queryTimeout must be > 0\");\n    }\n    this.queryTimeout = queryTimeout;\n    return this;\n  }\n\n  /**\n   * @return {@code true} when network activity logging is enabled\n   */\n  public boolean getLogActivity() {\n    return logActivity;\n  }\n\n  /**\n   * @return {@code ByteBufFormat} get Netty's log format\n   */\n  public ByteBufFormat getActivityLogFormat() {\n    return activityLogFormat;\n  }","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/dns/DnsClientOptions.java#L130-L166","documentation":"Configuration validation in DnsClientOptions.setQueryTimeout: the time after which a DNS query is considered failed must be at least 1 ms. A zero or negative timeout would fail every query immediately, so the setter rejects it.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/dns/DnsClientOptions.java:148 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a positive timeout in milliseconds","Validate configuration loaded from JSON before constructing the client options"],"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-14T05:17:10.506Z"}