{"record":{"id":"077fc858e2a92cd4","repo":"apache/seatunnel","slug":"invalid-firebase-rest-uri-constructed-check-param","errorCode":null,"errorMessage":"Invalid Firebase REST URI constructed. Check parameter formatting.","messagePattern":"Invalid Firebase REST URI constructed\\. Check parameter formatting\\.","errorType":"exception","errorClass":"SeaTunnelException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-firebase/src/main/java/org/apache/seatunnel/connectors/seatunnel/firebase/client/FirebaseHttpClient.java","lineNumber":182,"sourceCode":"                queryParts.add(encodeUriComponent(key) + \"=\" + encodeUriComponent(value));\n            }\n        }\n\n        if (!queryParts.isEmpty()) {\n            urlBuilder.append(\"?\").append(String.join(\"&\", queryParts));\n        }\n        return urlBuilder.toString();\n    }\n\n    /** Sends an HTTP GET request and handles status code verification. */\n    private String executeGet(String urlStr) {\n        HttpURLConnection connection = null;\n        try {\n            URL url;\n            try {\n                url = URI.create(urlStr).toURL();\n            } catch (IllegalArgumentException e) {\n                throw new SeaTunnelException(\n                        \"Invalid Firebase REST URI constructed. Check parameter formatting.\");\n            }\n            connection = (HttpURLConnection) url.openConnection();\n            connection.setRequestMethod(\"GET\");\n            connection.setConnectTimeout(timeoutMs);\n            connection.setReadTimeout(timeoutMs);\n            connection.setRequestProperty(\"Accept\", \"application/json\");\n            connection.setInstanceFollowRedirects(true);\n\n            if (credentials != null) {\n                String token = getAccessToken();\n                connection.setRequestProperty(\"Authorization\", \"Bearer \" + token);\n            }\n\n            int responseCode = connection.getResponseCode();\n            if (responseCode >= 200 && responseCode < 300) {\n                try (InputStream inputStream = connection.getInputStream();\n                        BufferedReader reader =","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-firebase/src/main/java/org/apache/seatunnel/connectors/seatunnel/firebase/client/FirebaseHttpClient.java#L164-L200","documentation":"executeGet builds the REST URL and converts it via URI.create(...).toURL(); if the URL string is not a syntactically valid URI, an IllegalArgumentException is caught and rethrown as this SeaTunnelException. It indicates the composed URL (base URL + path + node key + query params) is malformed.","triggerScenarios":"Base URL or path containing illegal URI characters (spaces, unencoded symbols, curly braces); query params with unescaped values; a node key containing characters like '#' or '%' that break URI parsing.","commonSituations":"Users putting trailing spaces or full URLs (with scheme) into the path option; special characters in Firebase keys (e.g. email-like keys with dots are fine, but spaces/brackets are not); copy-pasted URLs with invisible characters.","solutions":["URL-encode path segments and query parameter values (URLEncoder.encode) before they reach the client.","Remove spaces and illegal characters from url/path/QUERY_PARAMS config values.","Verify the base URL includes a valid scheme (https://) and host.","Print the constructed urlStr (from the cause chain) to identify which component is malformed."],"exampleFix":"// before\nMap<String,String> params = Map.of(\"orderBy\", \"\\\"first name\\\"\"); // unencoded spaces/quotes\n// after\nString encoded = URLEncoder.encode(\"\\\"first name\\\"\", StandardCharsets.UTF_8);\nMap<String,String> params = Map.of(\"orderBy\", encoded);","handlingStrategy":"validation","validationCode":"String urlStr = baseUrl + path + nodeKey + queryParams;\nURI.create(urlStr); // throws early if malformed\n// encode dynamic segments:\nString safeKey = URLEncoder.encode(nodeKey, StandardCharsets.UTF_8);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["URL-encode path segments and query values","Strip whitespace/invisible characters from url and path config","Ensure baseUrl has scheme https:// and a valid host","Test the composed URL with curl before running the job"],"tags":["firebase","url","http","validation"],"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-14T05:17:10.506Z"}