{"record":{"id":"3277e8439610431f","repo":"apache/iceberg","slug":"unrecognized-http-client-type-httpclienttype","errorCode":null,"errorMessage":"Unrecognized HTTP client type ${httpClientType}","messagePattern":"Unrecognized HTTP client type (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"aws/src/main/java/org/apache/iceberg/aws/AwsClientFactories.java","lineNumber":205,"sourceCode":"   * Build a httpClientBuilder object\n   *\n   * @deprecated Not for public use. To configure the httpClient for a client, please use {@link\n   *     HttpClientProperties#applyHttpClientConfigurations(AwsSyncClientBuilder)}. It will be\n   *     removed in 2.0.0\n   */\n  @Deprecated\n  public static SdkHttpClient.Builder configureHttpClientBuilder(String httpClientType) {\n    String clientType = httpClientType;\n    if (Strings.isNullOrEmpty(clientType)) {\n      clientType = HttpClientProperties.CLIENT_TYPE_DEFAULT;\n    }\n    switch (clientType) {\n      case HttpClientProperties.CLIENT_TYPE_URLCONNECTION:\n        return UrlConnectionHttpClient.builder();\n      case HttpClientProperties.CLIENT_TYPE_APACHE:\n        return ApacheHttpClient.builder();\n      default:\n        throw new IllegalArgumentException(\"Unrecognized HTTP client type \" + httpClientType);\n    }\n  }\n\n  /**\n   * Configure the endpoint setting for a client\n   *\n   * @deprecated Not for public use. To configure the endpoint for a client, please use {@link\n   *     S3FileIOProperties#applyEndpointConfigurations(S3BaseClientBuilder)}, {@link\n   *     AwsProperties#applyGlueEndpointConfigurations(GlueClientBuilder)}, or {@link\n   *     AwsProperties#applyDynamoDbEndpointConfigurations(DynamoDbClientBuilder)}, or {@link\n   *     AwsProperties#applyKmsEndpointConfigurations(KmsClientBuilder)} accordingly. It will be\n   *     removed in 2.0.0\n   */\n  @Deprecated\n  public static <T extends SdkClientBuilder> void configureEndpoint(T builder, String endpoint) {\n    if (endpoint != null) {\n      builder.endpointOverride(URI.create(endpoint));\n    }","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/aws/src/main/java/org/apache/iceberg/aws/AwsClientFactories.java#L187-L223","documentation":"AwsClientFactories.configureHttpClientBuilder selects an AWS SDK HTTP client implementation based on the configured client type. Only 'urlconnection' and 'apache' are recognized; any other value for the HTTP client type property falls through the switch's default branch and throws this IllegalArgumentException. This is a configuration error surfaced at client factory construction time.","triggerScenarios":"Setting client.type (HttpClientProperties.HTTP_CLIENT_TYPE) to any value other than 'urlconnection' or 'apache' — e.g. 'url-connection', 'URLCONNECTION', 'java11', 'netty', or a typo — then building a client via AwsClientFactories with that configuration.","commonSituations":"Typos or wrong casing in catalog/S3 FileIO configuration properties; copying config from docs for the AWS SDK's other HTTP implementations (netty, aws-crt) which Iceberg's aws module does not wire up; stale configs after renaming the property value.","solutions":["Set client.type to exactly 'urlconnection' or 'apache' (values of HttpClientProperties.CLIENT_TYPE_URLCONNECTION / CLIENT_TYPE_APACHE).","If you intended a different AWS SDK HTTP client (netty, aws-crt), remove the property or implement a custom S3FileIOAwsClientFactory, since those are not supported by the built-in factory.","Ensure the corresponding SDK module (url-connection-client or apache-client) is on the classpath; then rebuild the client factory."],"exampleFix":"// before\nMap<String, String> props = Map.of(\"client.type\", \"netty\");\n// after\nMap<String, String> props = Map.of(\"client.type\", HttpClientProperties.CLIENT_TYPE_APACHE);","handlingStrategy":"validation","validationCode":"String type = props.get(\"client.type\");\nif (type != null && !type.equals(\"urlconnection\") && !type.equals(\"apache\")) {\n  throw new IllegalArgumentException(\"client.type must be 'urlconnection' or 'apache', got: \" + type);\n}","typeGuard":null,"tryCatchPattern":"try {\n  factory = AwsClientFactories.from(props);\n} catch (IllegalArgumentException e) {\n  LOG.error(\"Bad HTTP client type config: {}\", e.getMessage());\n  throw e;\n}","preventionTips":["Reference HttpClientProperties.CLIENT_TYPE_* constants instead of raw strings in code.","Validate all Iceberg AWS config keys at application startup before creating clients.","Only use HTTP client types documented for iceberg-aws (urlconnection, apache)."],"tags":["aws","configuration","http-client","invalid-enum-value"],"backgroundTag":"invalid-enum-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}