{"record":{"id":"e3e49e852403ba4f","repo":"apache/iceberg","slug":"parser-context-is-not-supported","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/BaseHTTPClient.java","lineNumber":171,"sourceCode":"      String path,\n      Map<String, String> queryParams,\n      Map<String, String> headers,\n      Object body);\n\n  protected abstract <T extends RESTResponse> T execute(\n      HTTPRequest request,\n      Class<T> responseType,\n      Consumer<ErrorResponse> errorHandler,\n      Consumer<Map<String, String>> responseHeaders);\n\n  protected <T extends RESTResponse> T execute(\n      HTTPRequest request,\n      Class<T> responseType,\n      Consumer<ErrorResponse> errorHandler,\n      Consumer<Map<String, String>> responseHeaders,\n      ParserContext parserContext) {\n    if (null != parserContext) {\n      throw new UnsupportedOperationException(\"Parser context is not supported\");\n    }\n\n    return execute(request, responseType, errorHandler, responseHeaders);\n  }\n}\n","sourceCodeStart":153,"sourceCodeEnd":177,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/rest/BaseHTTPClient.java#L153-L177","documentation":"BaseHTTPClient.execute rejects any non-null ParserContext: this HTTP client implementation does not support parser contexts and throws UnsupportedOperationException unconditionally. ParserContext is an optional parsing-customization mechanism; the default REST client does not implement it, so calls through the get/post overloads accepting a context always fail.","triggerScenarios":"Calling get/post (or the execute overload shown) on BaseHTTPClient with a non-null parserContext argument, e.g. custom catalog/extension code passing parsing config through the REST session.","commonSituations":"Custom catalog or extension code supplying a ParserContext to the standard REST client; swapping client implementations where the new one lacks ParserContext support.","solutions":["Pass null for parserContext when using BaseHTTPClient","Use a client implementation that supports ParserContext","Refactor calling code to not rely on parser-context customization","File/track an issue to add ParserContext support to the HTTP client"],"exampleFix":"// before\nclient.post(path, body, responseType, errorHandler, headers, parserContext);\n// after\nclient.post(path, body, responseType, errorHandler, headers, null);","handlingStrategy":"type-guard","validationCode":"if (parserContext != null && client instanceof BaseHTTPClient) {\n  throw new IllegalArgumentException(\"This client does not support ParserContext\");\n}","typeGuard":"boolean supportsParserContext(Object client) {\n  return !(client instanceof BaseHTTPClient);\n}","tryCatchPattern":"try {\n  client.post(path, body, responseType, errorHandler, headers, parserContext);\n} catch (UnsupportedOperationException e) {\n  // retry without parserContext\n}","preventionTips":["Never pass ParserContext to the default BaseHTTPClient","Check client capabilities before using optional API extensions","Keep custom client implementations in sync with REST client interfaces"],"tags":["rest-client","http","parser-context"],"backgroundTag":"method-not-implemented","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"}