{"record":{"id":"dad6bb7da9182f91","repo":"xpipe-io/xpipe","slug":"no-connection-found-for-input-msg-getconnectio","errorCode":null,"errorMessage":"No connection found for input \" + msg.getConnection()","messagePattern":"No connection found for input \" \\+ msg\\.getConnection\\(\\)","errorType":"exception","errorClass":"BeaconClientException","httpStatus":400,"severity":"error","filePath":"app/src/main/java/io/xpipe/app/beacon/api/TerminalExternalLaunchExchange.java","lineNumber":33,"sourceCode":"import lombok.Builder;\nimport lombok.NonNull;\nimport lombok.Value;\nimport lombok.extern.jackson.Jacksonized;\n\nimport java.util.List;\n\npublic class TerminalExternalLaunchExchange extends BeaconInterface<TerminalExternalLaunchExchange.Request> {\n\n    @Override\n    public String getPath() {\n        return \"/terminal/externalLaunch\";\n    }\n\n    @Override\n    public Object handle(HttpExchange exchange, Request msg) throws BeaconClientException, BeaconServerException {\n        var found = DataStorageQuery.queryUserInput(msg.getConnection());\n        if (found.isEmpty()) {\n            throw new BeaconClientException(\"No connection found for input \" + msg.getConnection());\n        }\n\n        if (found.size() > 1) {\n            throw new BeaconClientException(\"Multiple stores found: \"\n                    + found.stream().map(DataStoreEntry::getName).toList());\n        }\n\n        var e = found.getFirst();\n        var isShell = e.getStore() instanceof ShellStore;\n        if (!isShell) {\n            throw new BeaconClientException(\n                    \"Connection \" + DataStorage.get().getStorePath(e).toString() + \" is not a shell connection\");\n        }\n\n        if (!checkPermission()) {\n            return Response.builder().command(List.of()).build();\n        }\n","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/xpipe-io/xpipe/blob/d85ca821baa46092a320ebb13546d7240adb74f8/app/src/main/java/io/xpipe/app/beacon/api/TerminalExternalLaunchExchange.java#L15-L51","documentation":"TerminalExternalLaunchExchange resolves the free-form 'connection' input via DataStorageQuery.queryUserInput. If no connection matches the given string, the exchange cannot launch a terminal and throws this BeaconClientException.","triggerScenarios":"Calling the terminal/external launch endpoint with a 'connection' string that matches no store — wrong name, typo, UUID of a deleted connection, or a fully-qualified path with a wrong segment.","commonSituations":"Typo or case mismatch in the connection name; connection deleted or renamed since the script was written; referencing a connection that lives in a different category path; passing a category instead of a connection.","solutions":["Run the exact string through DataStorageQuery.queryUserInput locally to see matches before calling","Use the full store path or exact UUID of the connection","List available connections (store/query API) to find the correct identifier","Re-create the connection if it was deleted"],"exampleFix":"// before\nclient.terminalLaunch(\"mydb\"); // ambiguous/missing\n// after\nvar found = DataStorageQuery.queryUserInput(\"MyCategory/mydb\");\nif (found.size() == 1) {\n    client.terminalLaunch(found.getFirst().getUuid());\n}","handlingStrategy":"validation","validationCode":"var found = DataStorageQuery.queryUserInput(connection);\nif (found.isEmpty()) throw new IllegalArgumentException(\"unknown connection: \" + connection);","typeGuard":null,"tryCatchPattern":"try {\n    client.terminalLaunch(input);\n} catch (BeaconClientException ex) {\n    if (ex.getMessage().startsWith(\"No connection found\")) {\n        // list connections and correct the identifier\n    } else throw ex;\n}","preventionTips":["Use full store path or UUID for lookups","Cache UUIDs instead of free-form names","Re-resolve names after renames/deletions"],"tags":["terminal","not-found","connection","xpipe"],"backgroundTag":"resource-not-found","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"}