{"record":{"id":"d0f06a4d4b2e9ffb","repo":"apache/iceberg","slug":"query-params-are-not-supported","errorCode":null,"errorMessage":"Query params are not supported","messagePattern":"Query params are not supported","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/rest/RESTClient.java","lineNumber":69,"sourceCode":"      Supplier<Map<String, String>> headers,\n      Consumer<ErrorResponse> errorHandler) {\n    return delete(path, ImmutableMap.of(), responseType, headers.get(), errorHandler);\n  }\n\n  <T extends RESTResponse> T delete(\n      String path,\n      Class<T> responseType,\n      Map<String, String> headers,\n      Consumer<ErrorResponse> errorHandler);\n\n  default <T extends RESTResponse> T delete(\n      String path,\n      Map<String, String> queryParams,\n      Class<T> responseType,\n      Map<String, String> headers,\n      Consumer<ErrorResponse> errorHandler) {\n    if (null != queryParams && !queryParams.isEmpty()) {\n      throw new UnsupportedOperationException(\"Query params are not supported\");\n    }\n\n    return delete(path, responseType, headers, errorHandler);\n  }\n\n  default <T extends RESTResponse> T get(\n      String path,\n      Class<T> responseType,\n      Supplier<Map<String, String>> headers,\n      Consumer<ErrorResponse> errorHandler) {\n    return get(path, ImmutableMap.of(), responseType, headers, errorHandler);\n  }\n\n  default <T extends RESTResponse> T get(\n      String path,\n      Class<T> responseType,\n      Map<String, String> headers,\n      Consumer<ErrorResponse> errorHandler) {","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/rest/RESTClient.java#L51-L87","documentation":"The RESTClient default delete(path, queryParams, ...) convenience overload does not support query parameters; it throws UnsupportedOperationException if any are passed and delegates to the plain delete. Callers needing query parameters must use an overload/client that supports them.","triggerScenarios":"Calling restClient.delete(path, queryParams, responseType, headers, errorHandler) with a non-empty/non-null queryParams map; porting GET-style code (with filters encoded as query params) to DELETE without adjusting the call.","commonSituations":"Migrating code from other HTTP clients to RESTClient; trying to add filters or pagination params to a DELETE call; using the convenience overload out of habit.","solutions":["Use the delete overload without queryParams, encoding needed values into the path","Use a concrete RESTClient implementation (e.g. HttpClient) that supports deletes with query params, if available","Drop query parameters if the endpoint does not require them","Encode filters into path segments where the REST spec defines them"],"exampleFix":"// before\nclient.delete(\"v1/namespaces/ns/tables\", ImmutableMap.of(\"purge\", \"true\"), respType, headers, handler);\n// after\nclient.delete(\"v1/namespaces/ns/tables/purge\", respType, headers, handler);","handlingStrategy":"validation","validationCode":"if (queryParams != null && !queryParams.isEmpty()) {\n  throw new IllegalArgumentException(\"Use delete without queryParams or a header-capable client\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  return client.delete(path, queryParams, type, headers, handler);\n} catch (UnsupportedOperationException e) {\n  return client.delete(path, type, headers, handler); // fallback\n}","preventionTips":["Encode filters into the request path per the REST spec, not query params","Check overload signatures before porting HTTP calls","Prefer the minimal delete overload unless you need params","Document which RESTClient overloads your concrete client supports"],"tags":["rest-client","unsupported-operation","api"],"backgroundTag":"unsupported-operation","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}