ToolJet/ToolJet · error · QueryError
Method not found
Error message
Method not found
What it means
invokeMethod is the plugin's dynamic-method entry point used by ToolJet for inspector/dropdown data loading. The DynamoDB implementation only registers 'listTables'; any other methodName reaches the unconditional throw at the end of the method. This is a capability guard, not a transient failure — the plugin deliberately exposes a single method.
Source
Thrown at plugins/packages/dynamodb/lib/index.ts:147
if (Object.keys(values).length === 0) return {};
return { ExpressionAttributeValues: values };
}
private mergeExpressionAttributeValues(condition: any, pairs?: [string, string][]): void {
const values = this.buildExpressionAttributeValues(pairs);
if (Object.keys(values).length === 0) return;
condition.ExpressionAttributeValues = {
...(condition.ExpressionAttributeValues || {}),
...values,
};
}
async invokeMethod(methodName: string, _context: unknown, sourceOptions: SourceOptions, args?: any): Promise<unknown> {
if (methodName === 'listTables') {
const client = await this.getConnection(sourceOptions, { operation: 'list_tables' });
return await this._listAllTables(client, args);
}
throw new QueryError('Method not found', `Method '${methodName}' is not supported by the DynamoDB plugin`, {});
}
private async _listAllTables(
client: DynamoDBClient,
args?: any
): Promise<{ items: Array<{ value: string; label: string }>; totalCount: number }> {
const tables: string[] = [];
let lastEvaluatedTableName: string | undefined;
try {
do {
const command = new ListTablesCommand({ ExclusiveStartTableName: lastEvaluatedTableName, Limit: 100 });
const data = await client.send(command);
tables.push(...(data.TableNames || []));
lastEvaluatedTableName = data.LastEvaluatedTableName;
} while (lastEvaluatedTableName);
} catch (err) {
throw new QueryError('Could not fetch tables', err.message, {});View on GitHub (pinned to 20602a8e10)
Solutions
- Confirm the only supported methodName for DynamoDB is 'listTables'; change the caller to use it or pick a different operation.
- If you need table metadata beyond names, run a 'describe_table' operation through run() instead of invokeMethod.
- If methodName arrives empty, fix the upstream binding so it resolves to 'listTables'.
Example fix
// before
await plugin.invokeMethod('describeTables', ctx, sourceOptions, args);
// after — use the run() path for describe, invokeMethod only for listing
await plugin.run(sourceOptions, { operation: 'describe_table', table: 'myTable' }); Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_METHODS = ['listTables'];
if (!SUPPORTED_METHODS.includes(methodName)) {
throw new Error(`DynamoDB invokeMethod supports only: ${SUPPORTED_METHODS.join(', ')}`);
} Type guard
function isDynamoInvokeMethod(m: unknown): m is 'listTables' { return m === 'listTables'; } Try / catch
try { await plugin.invokeMethod(methodName, ctx, sourceOptions, args); }
catch (e) { if (e instanceof QueryError && e.message === 'Method not found') { /* fall back to run() with operation */ } else throw e; } Prevention
- Do not reuse method names from other plugins against DynamoDB.
- Bind dropdowns that call invokeMethod to the single supported value.
- Prefer run() with operation for anything beyond listing tables.
When it happens
Trigger: ToolJet (or a custom client) calls invokeMethod with a methodName other than 'listTables' — for example 'getItems', 'describe', or a method name that exists on another plugin (e.g. MongoDB's listDatabases) but was copy-pasted into a DynamoDB query. Also fires if methodName is undefined because a component binding resolved to nothing.
Common situations: Reusing a query or component configuration from a different datasource plugin that exposes more invokeMethod hooks. A frontend schema/widget that enumerates methods generically and surfaces one DynamoDB does not implement. An older app definition referencing a method that was never implemented or was removed.
Related errors
- Query could not be completed
- MISSING_ACCESS_TOKEN
- Select an operation
- Client Id is required
- Client Secret is required
AI-assisted analysis of ToolJet/ToolJet@20602a8e10 (2026-08-13).
Data as JSON: /api/errors/8865e5dfc7eb848c.
Report an issue: GitHub.