{"record":{"id":"8bfe7fa6248f06bc","repo":"t8y2/dbx","slug":"unsupported-object-type-objecttype-8bfe7f","errorCode":null,"errorMessage":"Unsupported object type: {objectType}","messagePattern":"Unsupported object type: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"agents/drivers/firebird/src/main/java/com/dbx/agent/firebird/FirebirdAgent.java","lineNumber":127,"sourceCode":"                        }\n                    }\n                }\n            }\n\n            String source = !found || body == null || body.isBlank()\n                ? \"\"\n                : buildProcedureDdl(name, inputs, outputs, body);\n            return new ObjectSource(name, normalizedType, schema, source, false);\n        });\n    }\n\n    static String normalizeObjectSourceType(String objectType) {\n        if (objectType == null) {\n            throw new IllegalArgumentException(\"Unsupported object type: null\");\n        }\n        String normalized = objectType.trim().toUpperCase(Locale.ROOT);\n        if (!\"PROCEDURE\".equals(normalized)) {\n            throw new IllegalArgumentException(\"Unsupported object type: \" + objectType);\n        }\n        return normalized;\n    }\n\n    private static String buildProcedureDdl(\n        String name,\n        List<ProcedureParameter> inputs,\n        List<ProcedureParameter> outputs,\n        String body\n    ) {\n        StringBuilder ddl = new StringBuilder(\"CREATE OR ALTER PROCEDURE \")\n            .append(quoteIdentifier(name));\n        appendParameterBlock(ddl, inputs, \" (\");\n        if (inputs.isEmpty()) {\n            ddl.append('\\n');\n        }\n        if (!outputs.isEmpty()) {\n            appendParameterBlock(ddl, outputs, \"RETURNS (\");","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/firebird/src/main/java/com/dbx/agent/firebird/FirebirdAgent.java#L109-L145","documentation":"FirebirdAgent.normalizeObjectSourceType validates the object type before building DDL. Only 'PROCEDURE' is supported; a null or any other value (view, table, trigger, etc.) throws IllegalArgumentException with the original input embedded in the message. The input is trimmed and upper-cased before comparison, so only genuinely unsupported types fail.","triggerScenarios":"Calling code (via normalizedType) requests DDL for a Firebird object whose type string is null or anything other than 'PROCEDURE' (case-insensitive, surrounding whitespace tolerated).","commonSituations":"A UI or catalog listing lets users request source for Firebird tables, views, triggers, or packages; a caller passes the raw type from metadata queries without filtering; null type from an unpopulated metadata row.","solutions":["Only pass 'PROCEDURE' (any case) to the Firebird object-source API","Filter or map other object types before calling; skip objects the driver cannot expose","Handle null types upstream by treating them as unsupported rather than forwarding them"],"exampleFix":"// before\nagent.getSource(schema, name, objectType); // objectType = \"TABLE\"\n// after\nif (\"PROCEDURE\".equalsIgnoreCase(objectType)) {\n    agent.getSource(schema, name, objectType);\n} else {\n    throw new UnsupportedOperationException(\"Firebird source only supports procedures: \" + objectType);\n}","handlingStrategy":"validation","validationCode":"if (objectType == null || !objectType.trim().equalsIgnoreCase(\"PROCEDURE\")) { throw new IllegalArgumentException(\"Firebird source requires PROCEDURE, got: \" + objectType); }","typeGuard":"static boolean isSupportedFirebirdObjectType(String t) { return t != null && t.trim().equalsIgnoreCase(\"PROCEDURE\"); }","tryCatchPattern":"try { source = agent.getSource(schema, name, type); } catch (IllegalArgumentException e) { log.warn(\"Unsupported Firebird object type: {}\", type); return Optional.empty(); }","preventionTips":["Whitelist object types to PROCEDURE before calling the Firebird source API","Normalize (trim + uppercase) type strings at your API boundary","Treat null types as unsupported and skip them early"],"tags":["firebird","unsupported-object-type","argument-validation","ddl"],"backgroundTag":"unsupported-object-type","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"}