n8n-io/n8n · error · OperationalError
Too many redirects (max ${maxRedirects})
Error message
Too many redirects (max ${maxRedirects}) What it means
Error "Too many redirects (max ${maxRedirects})" thrown in n8n-io/n8n.
Source
Thrown at packages/@n8n/ai-utilities/src/utils/follow-redirects.ts:48
}
const response = await fetcher(currentInput, {
...currentInit,
redirect: 'manual',
});
if (response.status < 300 || response.status >= 400) {
return response;
}
const location = response.headers.get('location');
if (!location) {
return response;
}
hops += 1;
if (hops > maxRedirects) {
throw new OperationalError(`Too many redirects (max ${maxRedirects})`);
}
await response.body?.cancel().catch(() => {});
currentInput = new URL(location, currentUrlString);
const method = (currentInit.method ?? 'GET').toUpperCase();
const isUnsafe = method !== 'GET' && method !== 'HEAD';
if (
response.status === 303 ||
((response.status === 301 || response.status === 302) && isUnsafe)
) {
currentInit = { ...currentInit, method: 'GET', body: undefined };
}
}
}
View on GitHub (pinned to 5ac6606e81)
When it happens
Trigger: Thrown at packages/@n8n/ai-utilities/src/utils/follow-redirects.ts:48 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/11cb3cd864a60ab9.
Report an issue: GitHub.