{"record":{"id":"2531a01cad280b6f","repo":"apache/seatunnel","slug":"invalid-deep-lake-workspace","errorCode":null,"errorMessage":"Invalid Deep Lake workspace","messagePattern":"Invalid Deep Lake workspace","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-deeplake/src/main/java/org/apache/seatunnel/connectors/seatunnel/deeplake/client/DeepLakeClient.java","lineNumber":110,"sourceCode":"                            : EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);\n            if (status < 200 || status >= 300) {\n                throw new DeepLakeConnectorException(\n                        DeepLakeConnectorErrorCode.REQUEST_FAILED,\n                        \"Deep Lake request failed with HTTP \"\n                                + status\n                                + (responseBody.isEmpty() ? \"\" : \": \" + responseBody));\n            }\n        } catch (IOException e) {\n            throw new DeepLakeConnectorException(\n                    DeepLakeConnectorErrorCode.REQUEST_FAILED, \"Deep Lake request failed\", e);\n        }\n    }\n\n    private static String encodePathSegment(String value) {\n        try {\n            return URLEncoder.encode(value, StandardCharsets.UTF_8.name()).replace(\"+\", \"%20\");\n        } catch (Exception e) {\n            throw new IllegalArgumentException(\"Invalid Deep Lake workspace\", e);\n        }\n    }\n\n    @Override\n    public void close() throws IOException {\n        httpClient.close();\n    }\n}\n","sourceCodeStart":92,"sourceCodeEnd":119,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-deeplake/src/main/java/org/apache/seatunnel/connectors/seatunnel/deeplake/client/DeepLakeClient.java#L92-L119","documentation":"DeepLakeClient percent-encodes the workspace name as a URL path segment using URLEncoder.encode with UTF-8. If the encode call throws, the client wraps it in an IllegalArgumentException('Invalid Deep Lake workspace'). It signals the workspace value could not be safely encoded for the Deep Lake REST URL.","triggerScenarios":"Any call to DeepLakeClient.workspace(...) when URLEncoder.encode(value, 'UTF-8') fails. Nearly unreachable on standard JVMs since UTF-8 is always available; can surface on exotic or broken runtimes/charsets.","commonSituations":"Running on a stripped-down JVM image without the UTF-8 charset provider (minimal containers), custom runtime environments, or setups where charset lookup via StandardCharsets.UTF_8.name() fails.","solutions":["Ensure the JVM supports the UTF-8 charset (standard JDK 8+ does); rebuild/replace any stripped runtime","Verify no agent or ClassLoader is shadowing java.nio.charset implementations","Update the connector/runtime; on modern JDKs this path is effectively dead code"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (workspace == null || workspace.trim().isEmpty()) { throw new IllegalArgumentException(\"workspace must not be blank\"); }","typeGuard":"boolean isValidWorkspace(String ws) { return ws != null && !ws.trim().isEmpty(); }","tryCatchPattern":"try { client.workspace(ws); } catch (IllegalArgumentException e) { log.error(\"workspace encoding failed\", e); throw e; }","preventionTips":["Always supply a plain, non-null workspace name","Run on a standard JDK 8+ where UTF-8 is guaranteed","Avoid custom runtimes that strip charset providers"],"tags":["deeplake","url-encoding","jvm"],"backgroundTag":"invalid-url-format","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}