ToolJet/ToolJet · error · Error
Summarisation operation failed
Error message
Summarisation operation failed
What it means
query_operation.ts's summarisation_operation() POSTs to `${api_url}${model_summarisation}` and throws this plain Error when response.ok is false. Identical in shape and shortcomings to error 155: the HTTP status and HF's structured error body are discarded. Surfaces to callers as error 152 (run()'s catch wraps it again) so the description ends up being just 'Summarisation operation failed'.
Source
Thrown at marketplace/plugins/hugging_face/lib/query_operation.ts:28
});
if (!response.ok) {
throw new Error('Text generation operation failed');
}
return await response.json();
}
export async function summarisation_operation(api_url, queryOptions, headers) {
const { model_summarisation, input_summarisation, operation_parameters_summarisation } = queryOptions;
const response = await fetch(`${api_url}${model_summarisation}`, {
method: 'POST',
headers,
body: JSON.stringify({
inputs: input_summarisation,
...(operation_parameters_summarisation ? { parameters: JSON.parse(operation_parameters_summarisation) } : {}),
}),
});
if (!response.ok) {
throw new Error('Summarisation operation failed');
}
return await response.json();
}
View on GitHub (pinned to 20602a8e10)
Solutions
- Patch the throw to include status + body (same pattern as error 155's fix).
- Use a model that actually exposes a summarisation route (e.g. 'facebook/bart-large-cnn') — not all models do.
- For 503, set sourceOptions.wait_for_model=true or retry after estimated_time.
- For oversized input, truncate or chunk input_summarisation to the model's max token length.
- Validate operation_parameters_summarisation is valid JSON before sending.
Example fix
// before
if (!response.ok) {
throw new Error('Summarisation operation failed');
}
// after
if (!response.ok) {
const body = await response.text();
const err = new Error(`Summarisation failed (${response.status}): ${body}`);
(err as any).status = response.status;
(err as any).body = body;
throw err;
} Defensive patterns
Strategy: retry
Validate before calling
function validateSummarisationQuery(qo) {
if (!qo?.model_summarisation) throw new Error('model_summarisation is required');
if (typeof qo.input_summarisation !== 'string') throw new Error('input_summarisation must be a string');
if (qo.operation_parameters_summarisation !== undefined) {
try { JSON.parse(qo.operation_parameters_summarisation); }
catch (e) { throw new Error(`operation_parameters_summarisation invalid JSON: ${e.message}`); }
}
}
validateSummarisationQuery(queryOptions); Type guard
function isSummarisationQuery(qo): qo is { model_summarisation: string; input_summarisation: string } {
return typeof qo?.model_summarisation === 'string' && typeof qo?.input_summarisation === 'string';
} Try / catch
async function summariseWithRetry(fn, retries = 2) {
for (let i = 0; i <= retries; i++) {
try { return await fn(); }
catch (e) {
if (/Summarisation operation failed/.test(e.message) && i < retries) {
await new Promise(r => setTimeout(r, 500 * 2 ** i));
continue;
}
throw e;
}
}
} Prevention
- Patch summarisation_operation to throw with status + body for actionable retries.
- Use a model that exposes a summarisation route (e.g. facebook/bart-large-cnn).
- Set wait_for_model=true for cold-start-prone models.
- Truncate input_summarisation to the model's context window.
When it happens
Trigger: Summarisation model is loading (503) and wait_for_model is false; gated model without license acceptance (401/403); model_summarisation id typo or non-summarisation model (some models reject the inference route); oversized input_summarisation (413); rate limit (429); malformed operation_parameters_summarisation.
Common situations: Using a text-generation model id in the summarisation field (model mismatch); cold-start without x-wait-for-model; community summarisation model that has been deprecated; long input that exceeds model context window.
Related errors
- Text generation operation failed
- Query could not be completed
- Connection test failed
- Query execution failed
- Query could not be completed
AI-assisted analysis of ToolJet/ToolJet@20602a8e10 (2026-08-13).
Data as JSON: /api/errors/8c8307601e568613.
Report an issue: GitHub.