{"record":{"id":"7c12638aa0fa001c","repo":"eclipse-vertx/vert.x","slug":"maxqueries-must-be-0","errorCode":null,"errorMessage":"maxQueries must be > 0","messagePattern":"maxQueries must be > 0","errorType":"exception","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/dns/AddressResolverOptions.java","lineNumber":418,"sourceCode":"    return this;\n  }\n\n  /**\n   * @return the maximum number of queries to be sent during a resolution\n   */\n  public int getMaxQueries() {\n    return maxQueries;\n  }\n\n  /**\n   * Set the maximum number of queries when an hostname is resolved.\n   *\n   * @param maxQueries the max number of queries to be sent\n   * @return a reference to this, so the API can be used fluently\n   */\n  public AddressResolverOptions setMaxQueries(int maxQueries) {\n    if (maxQueries < 1) {\n      throw new IllegalArgumentException(\"maxQueries must be > 0\");\n    }\n    this.maxQueries = maxQueries;\n    return this;\n  }\n\n  /**\n   * @return the DNS queries <i>Recursion Desired</i> flag value\n   */\n  public boolean getRdFlag() {\n    return rdFlag;\n  }\n\n  /**\n   * Set the DNS queries <i>Recursion Desired</i> flag value.\n   *\n   * @param rdFlag the flag value\n   * @return a reference to this, so the API can be used fluently\n   */","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/dns/AddressResolverOptions.java#L400-L436","documentation":"Configuration validation in setMaxQueries: the number of DNS queries sent during a single resolution (following referrals/search domains) must be at least 1. Zero or negative values would prevent any resolution, so the setter rejects them up front.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/dns/AddressResolverOptions.java:418 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a positive integer (default is 4)","Check configuration values deserialized from JSON before building the 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"}