{"record":{"id":"a4de672cc65b0f69","repo":"t8y2/dbx","slug":"completion-assistant-search-is-not-supported-by-th","errorCode":null,"errorMessage":"Completion assistant search is not supported by this agent","messagePattern":"Completion assistant search is not supported by this agent","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"warning","filePath":"agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java","lineNumber":25,"sourceCode":"\npublic abstract class BaseDatabaseAgent implements DatabaseAgent {\n    @Override\n    public List<ObjectInfo> listObjects(String schema) {\n        List<ObjectInfo> result = new ArrayList<>();\n        for (TableInfo table : listTables(schema)) {\n            result.add(new ObjectInfo(table.getName(), table.getTable_type(), schema, table.getComment()));\n        }\n        return result;\n    }\n\n    @Override\n    public ObjectSource getObjectSource(String schema, String name, String objectType) {\n        throw new UnsupportedOperationException(\"Object source is not supported\");\n    }\n\n    @Override\n    public CompletionAssistantResponse completionAssistantSearch(CompletionAssistantRequest request) {\n        throw new UnsupportedOperationException(\"Completion assistant search is not supported by this agent\");\n    }\n\n    @Override\n    public String getTableDdl(String schema, String table) {\n        List<IndexInfo> indexes;\n        try {\n            indexes = listIndexes(schema, table);\n        } catch (RuntimeException e) {\n            indexes = Collections.emptyList();\n        }\n\n        List<ForeignKeyInfo> foreignKeys;\n        try {\n            foreignKeys = listForeignKeys(schema, table);\n        } catch (RuntimeException e) {\n            foreignKeys = Collections.emptyList();\n        }\n","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java#L7-L43","documentation":"completionAssistantSearch provides SQL-completion assistant lookups; the base agent defaults to throwing UnsupportedOperationException because this capability is not implemented generically. Only agents/databases with dedicated completion support override it.","triggerScenarios":"Invoking completionAssistantSearch(request) on an agent subclass that inherits the BaseDatabaseAgent default (no completion-assistant support).","commonSituations":"Editor/IDE completion features wired against a driver agent that lacks completion backing; uniform feature dispatch across heterogeneous database agents.","solutions":["Route completion requests to an agent implementation that supports them","Feature-detect support before calling and disable completion UI gracefully","Override completionAssistantSearch in your agent if your backend can serve it","Catch UnsupportedOperationException and return an empty result"],"exampleFix":"// before\nvar resp = agent.completionAssistantSearch(request); // throws\n// after\nCompletionAssistantResponse resp;\ntry {\n    resp = agent.completionAssistantSearch(request);\n} catch (UnsupportedOperationException e) {\n    resp = CompletionAssistantResponse.empty();\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    CompletionAssistantResponse r = agent.completionAssistantSearch(request);\n} catch (UnsupportedOperationException e) {\n    CompletionAssistantResponse r = CompletionAssistantResponse.empty();\n}","preventionTips":["Gate completion features per-database in configuration","Catch UnsupportedOperationException and degrade to no-completion UX","Use agents that implement completionAssistantSearch for IDE-style features","Document which drivers support the completion assistant"],"tags":["jdbc","unsupported-operation","completion-assistant"],"backgroundTag":"unsupported-operation","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}