{"record":{"id":"890c52e0f6871ec0","repo":"n8n-io/n8n","slug":"failed-to-fetch-source-config-response-statusme","errorCode":null,"errorMessage":"Failed to fetch source config: ${response.statusMessage}","messagePattern":"Failed to fetch source config: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":500,"severity":"error","filePath":"packages/cli/src/controllers/telemetry.controller.ts","lineNumber":143,"sourceCode":"\t\tthis.applyCors(req, res);\n\n\t\tconst response = await this.outboundHttp\n\t\t\t.requests({\n\t\t\t\tssrf: 'disabled', // the source-config host is fixed\n\t\t\t})\n\t\t\t.request({\n\t\t\t\tmethod: 'GET',\n\t\t\t\turl: 'https://api-rs.n8n.io/sourceConfig',\n\t\t\t\theaders: {\n\t\t\t\t\tauthorization:\n\t\t\t\t\t\t'Basic ' + btoa(`${this.globalConfig.diagnostics.frontendConfig.split(';')[0]}:`),\n\t\t\t\t},\n\t\t\t\treturnFullResponse: true,\n\t\t\t\tignoreHttpStatusErrors: true,\n\t\t\t});\n\n\t\tif (response.statusCode < 200 || response.statusCode >= 300) {\n\t\t\tthrow new Error(`Failed to fetch source config: ${response.statusMessage}`);\n\t\t}\n\n\t\t// write directly to response to avoid wrapping the config in `data` key which is not expected by RudderStack sdk\n\t\tres.json(response.body);\n\t}\n}\n","sourceCodeStart":125,"sourceCodeEnd":150,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/cli/src/controllers/telemetry.controller.ts#L125-L150","documentation":"The controller fetches the RudderStack source config server-side; if the upstream returns a non-2xx status, n8n throws an Error with the upstream statusMessage ('Failed to fetch source config: <statusMessage>'). This is a real HTTP-status-driven throw, not a proxy error.","triggerScenarios":"Server-side GET to https://api-rs.n8n.io/sourceConfig returns statusCode < 200 or >= 300 (ignoreHttpStatusErrors is set, so non-2xx is not raised by the client and reaches this check).","commonSituations":"Upstream API outage or 5xx; invalid/expired diagnostics credentials (frontendConfig) producing 401/403; malformed diagnostics config; intermittent network error surfacing as a non-2xx.","solutions":["Verify N8N_DIAGNOSTICS_ENABLED and that the diagnostics frontendConfig value is valid and not expired.","Check api-rs.n8n.io reachability from the host and retry on transient upstream failures.","Disable diagnostics if the instance cannot reach the upstream to avoid repeated failures."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Confirm diagnostics config validity before relying on source-config.\nfunction diagnosticsConfigured(env = process.env) {\n  return Boolean(env.N8N_DIAGNOSTICS_ENABLED !== 'false' && env.frontendConfig);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await api.get('/telemetry/source-config'); // or the proxy route\n} catch (e) {\n  if (/Failed to fetch source config/.test(e.message)) {\n    // check diagnostics creds/upstream; retry with backoff, then disable diagnostics\n  } else { throw e; }\n}","preventionTips":["Validate diagnostics credentials during deployment.","Retry transient upstream failures with backoff before surfacing."],"tags":["telemetry","network","config","upstream"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}