{"record":{"id":"26815fb713184bcf","repo":"gatsbyjs/gatsby","slug":"plugin-plugin-name-called-actions-setrequesthea","errorCode":null,"errorMessage":"Plugin ${plugin.name} called actions.setRequestHeaders with a headers property that isn't an object.","messagePattern":"Plugin (.+?) called actions\\.setRequestHeaders with a headers property that isn't an object\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/redux/actions/public.js","lineNumber":1490,"sourceCode":"  }\n}\n\n/**\n * Stores request headers for a given domain to be later used when making requests for Image CDN (and potentially other features).\n *\n * @param {Object} $0\n * @param {string} $0.domain The domain to store the headers for.\n * @param {Object} $0.headers The headers to store.\n */\nactions.setRequestHeaders = ({ domain, headers }, plugin: Plugin) => {\n  const headersIsObject =\n    typeof headers === `object` && headers !== null && !Array.isArray(headers)\n\n  const noHeaders = !headersIsObject\n  const noDomain = typeof domain !== `string`\n\n  if (noHeaders) {\n    reporter.warn(\n      `Plugin ${plugin.name} called actions.setRequestHeaders with a headers property that isn't an object.`\n    )\n  }\n\n  if (noDomain) {\n    reporter.warn(\n      `Plugin ${plugin.name} called actions.setRequestHeaders with a domain property that isn't a string.`\n    )\n  }\n\n  if (noDomain || noHeaders) {\n    reporter.panic(\n      `Plugin ${plugin.name} attempted to set request headers with invalid arguments. See above warnings for more info.`\n    )\n\n    return null\n  }\n","sourceCodeStart":1472,"sourceCodeEnd":1508,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/redux/actions/public.js#L1472-L1508","documentation":"Validation inside actions.setRequestHeaders: a plugin stored request headers for a domain but passed a `headers` value that is not a plain object (null, array, string, etc.). The action rejects/ignores the value and warns, naming the offending plugin, since Image CDN request signing requires structured headers.","triggerScenarios":"Thrown at packages/gatsby/src/redux/actions/public.js:1490 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the plugin to pass headers as a plain object of string key/values","Check the plugin's setRequestHeaders call site for accidental stringified JSON","Update or pin the plugin to a fixed version"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}