{"record":{"id":"a532185ab468da58","repo":"gatsbyjs/gatsby","slug":"plugin-plugin-name-called-actions-setrequesthea-a53218","errorCode":null,"errorMessage":"Plugin ${plugin.name} called actions.setRequestHeaders with a domain property that isn't a string.","messagePattern":"Plugin (.+?) called actions\\.setRequestHeaders with a domain property that isn't a string\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/redux/actions/public.js","lineNumber":1496,"sourceCode":" * @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\n  const baseDomain = url.parse(domain)?.hostname\n\n  if (baseDomain) {\n    return {\n      type: `SET_REQUEST_HEADERS`,\n      payload: {","sourceCodeStart":1478,"sourceCodeEnd":1514,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/redux/actions/public.js#L1478-L1514","documentation":"Validation inside actions.setRequestHeaders: the `domain` argument is not a string (undefined, non-string, or malformed). The action warns naming the plugin, because domain-keyed header storage requires exact string domains for later image CDN requests.","triggerScenarios":"Thrown at packages/gatsby/src/redux/actions/public.js:1496 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the plugin to pass domain as a plain string (e.g. `example.com`)","Guard the domain value before calling setRequestHeaders","Update or patch the offending plugin"],"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"}