t8y2/dbx · error · IllegalArgumentException
Unsupported object type: {objectType}
Error message
Unsupported object type: {objectType} What it means
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.
Source
Thrown at agents/drivers/firebird/src/main/java/com/dbx/agent/firebird/FirebirdAgent.java:127
}
}
}
}
String source = !found || body == null || body.isBlank()
? ""
: buildProcedureDdl(name, inputs, outputs, body);
return new ObjectSource(name, normalizedType, schema, source, false);
});
}
static String normalizeObjectSourceType(String objectType) {
if (objectType == null) {
throw new IllegalArgumentException("Unsupported object type: null");
}
String normalized = objectType.trim().toUpperCase(Locale.ROOT);
if (!"PROCEDURE".equals(normalized)) {
throw new IllegalArgumentException("Unsupported object type: " + objectType);
}
return normalized;
}
private static String buildProcedureDdl(
String name,
List<ProcedureParameter> inputs,
List<ProcedureParameter> outputs,
String body
) {
StringBuilder ddl = new StringBuilder("CREATE OR ALTER PROCEDURE ")
.append(quoteIdentifier(name));
appendParameterBlock(ddl, inputs, " (");
if (inputs.isEmpty()) {
ddl.append('\n');
}
if (!outputs.isEmpty()) {
appendParameterBlock(ddl, outputs, "RETURNS (");View on GitHub (pinned to c0390bff16)
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
Example fix
// before
agent.getSource(schema, name, objectType); // objectType = "TABLE"
// after
if ("PROCEDURE".equalsIgnoreCase(objectType)) {
agent.getSource(schema, name, objectType);
} else {
throw new UnsupportedOperationException("Firebird source only supports procedures: " + objectType);
} Defensive patterns
Strategy: validation
Validate before calling
if (objectType == null || !objectType.trim().equalsIgnoreCase("PROCEDURE")) { throw new IllegalArgumentException("Firebird source requires PROCEDURE, got: " + objectType); } Type guard
static boolean isSupportedFirebirdObjectType(String t) { return t != null && t.trim().equalsIgnoreCase("PROCEDURE"); } Try / catch
try { source = agent.getSource(schema, name, type); } catch (IllegalArgumentException e) { log.warn("Unsupported Firebird object type: {}", type); return Optional.empty(); } Prevention
- 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
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- Unsupported object type: {objectType}
- Unsupported object type: " + objectType
- Object source is not supported
- Unsupported object type: " + objectType
- Unsupported object type: {objectType}
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/8bfe7fa6248f06bc.
Report an issue: GitHub.