{"record":{"id":"1ff38da34da1d27e","repo":"gatsbyjs/gatsby","slug":"112001","errorCode":"112001","errorMessage":"${errorMap.to}","messagePattern":"\\$\\{errorMap\\.to\\}","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts","lineNumber":182,"sourceCode":"    json.data &&\n    pluginOptions.debug.graphql.onlyReportCriticalErrors &&\n    // only return if we're not force disabling this.\n    // this is used when we make GraphQL requests intentionally rather than programmatically\n    // for ex during the Preview process\n    !forceReportCriticalErrors\n  ) {\n    return\n  }\n\n  for (const error of errors) {\n    const errorWasMapped =\n      errorMap &&\n      errorMap.from &&\n      errorMap.to &&\n      error.message === errorMap.from\n\n    if (errorWasMapped && panicOnError) {\n      reporter.panic({\n        id: CODES.RemoteGraphQLError,\n        context: {\n          sourceMessage: formatLogMessage(errorMap.to),\n        },\n      })\n    } else if (errorWasMapped) {\n      reporter.error({\n        id: CODES.RemoteGraphQLError,\n        context: {\n          sourceMessage: formatLogMessage(errorMap.to),\n        },\n      })\n    }\n\n    // convert the error path array into a string like \"mediaItems.nodes[55].mediaDetails.meta.focalLength\"\n    let errorPath = error?.path\n      ?.map((field, index) => {\n        // if this is a number it's the index of a node","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts#L164-L200","documentation":"Fires in handleGraphQLErrors when a fetched GraphQL error's message exactly equals the user-configured errorMap.from string and panicOnError is set: the panic reports the friendly errorMap.to mapping instead of the raw upstream error. It is a message-matching guard on the plugin options, not a new failure.","triggerScenarios":"Thrown at packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts:182 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the underlying remote WPGraphQL error described by errorMap.to","Update or correct the errorMap.from/errorMap.to entry in plugin options if the mapping is wrong","Set panicOnError to false (or rely on debug.graphql.onlyReportCriticalErrors) so the error is logged instead of halting the build"],"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"}