{"record":{"id":"703ff6f690c39320","repo":"xpipe-io/xpipe","slug":"urierrormessage","errorCode":null,"errorMessage":"${uriErrorMessage}","messagePattern":"\\$\\{uriErrorMessage\\}","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceStore.java","lineNumber":66,"sourceCode":"    @Override\n    public void checkComplete() throws Throwable {\n        // We do not require the host to be complete\n        if (getHost() != null && !(getHost().asNeeded().getStore() instanceof LocalStore)) {\n            Validators.isType(getHost(), HostAddressStore.class);\n        }\n        Validators.nonNull(remotePort);\n        Validators.nonNull(serviceProtocolType);\n        if (getHost() == null) {\n            Validators.nonNull(getAddress());\n        }\n\n        if (serviceProtocolType.hasScheme()) {\n            var addr = serviceProtocolType.formatAddress(getOpenTargetUrl());\n            if (addr != null) {\n                try {\n                    URI.create(addr);\n                } catch (IllegalArgumentException e) {\n                    throw new ValidationException(e.getMessage());\n                }\n            }\n        }\n    }\n\n    public String getOpenTargetUrl() {\n        var s = getSession();\n        if (s == null) {\n            var address = getAddress();\n\n            if (address == null\n                    && (getHost().getStore() instanceof HostAddressGatewayStore g)\n                    && !(getHost().getStore() instanceof NetworkTunnelStore)) {\n                address = g.getHostAddress().get();\n            }\n\n            if (address == null && (getHost().getStore() instanceof NetworkTunnelStore t)) {\n                var h = t.getTunnelHostName();","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/xpipe-io/xpipe/blob/d85ca821baa46092a320ebb13546d7240adb74f8/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceStore.java#L48-L84","documentation":"AbstractServiceStore.checkComplete() validates the service URL. When the configured service protocol type uses a scheme (e.g. http/https), it formats the open target URL as an address and attempts URI.create(addr); an IllegalArgumentException (the \"${uriErrorMessage}\") means the formatted address is not a syntactically valid URI, rethrown as ValidationException.","triggerScenarios":"checkComplete() on a service store whose protocol type has a scheme and whose getOpenTargetUrl() (host/port/path composed from config) produces a string rejected by URI.create — e.g. illegal characters, spaces, or unmatched braces in host, port, or path.","commonSituations":"Hostnames containing spaces or underscores in the wrong position; unencoded special characters in URL paths; ports or variables substituted with invalid values; a template placeholder that was never filled in.","solutions":["Fix the service URL/host/port configuration so the composed address is a valid URI","URL-encode any special characters in path/query components","Test the address with java.net.URI.create(addr) before saving the store","Switch the protocol type to one without a scheme if the target is not a URL-based service"],"exampleFix":"// before\nstore.setHost(\"my server\"); // space breaks URI\n// after\nstore.setHost(\"my-server\");","handlingStrategy":"validation","validationCode":"try {\n    java.net.URI.create(serviceProtocolType.formatAddress(getOpenTargetUrl()));\n} catch (IllegalArgumentException e) {\n    // invalid service URL — fix host/port/path before checkComplete()\n}","typeGuard":null,"tryCatchPattern":"try { store.checkComplete(); }\ncatch (ValidationException e) { /* surface URI error message to user */ }","preventionTips":["URL-encode path/query components","Reject spaces and illegal characters in hostnames/ports at input time","Ensure template placeholders are filled before validation"],"tags":["validation","uri","url","service-store"],"backgroundTag":"invalid-url-format","analyzedSha":"d85ca821baa46092a320ebb13546d7240adb74f8","analyzedAt":"2026-09-06T14:30:08.251Z","contentChangedAt":"2026-09-06T14:30:08.251Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}