{"record":{"id":"e04720340e9d998e","repo":"apache/iceberg","slug":"parser-context-is-not-supported-e04720","errorCode":null,"errorMessage":"Parser context is not supported","messagePattern":"Parser context is not supported","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/rest/RESTClient.java","lineNumber":108,"sourceCode":"\n  default <T extends RESTResponse> T get(\n      String path,\n      Map<String, String> queryParams,\n      Class<T> responseType,\n      Supplier<Map<String, String>> headers,\n      Consumer<ErrorResponse> errorHandler) {\n    return get(path, queryParams, responseType, headers.get(), errorHandler);\n  }\n\n  default <T extends RESTResponse> T get(\n      String path,\n      Map<String, String> queryParams,\n      Class<T> responseType,\n      Map<String, String> headers,\n      Consumer<ErrorResponse> errorHandler,\n      ParserContext parserContext) {\n    if (parserContext != null) {\n      throw new UnsupportedOperationException(\"Parser context is not supported\");\n    }\n    return get(path, queryParams, responseType, headers, errorHandler);\n  }\n\n  default <T extends RESTResponse> T get(\n      String path,\n      Map<String, String> queryParams,\n      Class<T> responseType,\n      Supplier<Map<String, String>> headers,\n      Consumer<ErrorResponse> errorHandler,\n      Consumer<Map<String, String>> responseHeaders) {\n    return get(path, queryParams, responseType, headers.get(), errorHandler, responseHeaders);\n  }\n\n  default <T extends RESTResponse> T get(\n      String path,\n      Map<String, String> queryParams,\n      Class<T> responseType,","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/rest/RESTClient.java#L90-L126","documentation":"The RESTClient default get(..., parserContext) overload does not support a ParserContext argument; passing a non-null context throws UnsupportedOperationException and the call falls back to the plain get. Parser contexts are only honored by clients/overloads that explicitly accept them.","triggerScenarios":"Calling the extended get(path, queryParams, responseType, headers, errorHandler, parserContext) with a non-null parserContext on the default RESTClient; passing a context 'just in case' when it is unnecessary.","commonSituations":"Copy-pasting code written against a richer HTTP client into one using the RESTClient interface defaults; new API surface used before the concrete client implements it.","solutions":["Pass null for parserContext and use the plain get overload","Ensure a concrete client implementation supports parser contexts before using this overload","Remove the parserContext argument if response parsing needs no context"],"exampleFix":"// before\nclient.get(path, params, type, headers, handler, parserContext); // non-null context\n// after\nclient.get(path, params, type, headers, handler);","handlingStrategy":"validation","validationCode":"if (parserContext != null) {\n  throw new IllegalArgumentException(\"Default RESTClient.get does not support ParserContext\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  return client.get(path, params, type, headers, handler, parserContext);\n} catch (UnsupportedOperationException e) {\n  return client.get(path, params, type, headers, handler);\n}","preventionTips":["Pass null for parserContext on the default interface","Only use the extended overload with clients that implement it","Keep call sites aligned with the concrete client's capabilities"],"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"}