{"record":{"id":"64db15d39d0ce987","repo":"gatsbyjs/gatsby","slug":"112003","errorCode":"112003","errorMessage":"\\n\\n\\t${sharedError}\\n\\tSee above for more information.","messagePattern":"\\\\n\\\\n\\\\t(.+?)\\\\n\\\\tSee above for more information\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"packages/gatsby-source-wordpress/src/utils/run-steps.ts","lineNumber":63,"sourceCode":"      }\n\n      if (activity) {\n        activity.end()\n      }\n    } catch (e) {\n      const sharedError = `Encountered a critical error when running the ${\n        apiName ? `${apiName}.` : ``\n      }${step.name} build step.`\n\n      // on errors, invoke any preview callbacks to send news of this error back to the WP Preview window.\n      await invokeAndCleanupLeftoverPreviewCallbacks({\n        status: `GATSBY_PREVIEW_PROCESS_ERROR`,\n        context: sharedError,\n        error: e,\n      })\n\n      console.error(e)\n      helpers.reporter.panic({\n        id: CODES.SourcePluginCodeError,\n        context: {\n          sourceMessage: formatLogMessage(\n            `\\n\\n\\t${sharedError}\\n\\tSee above for more information.`,\n            { useVerboseStyle: true }\n          ),\n        },\n      })\n    }\n  }\n}\n\n/**\n * Takes in a pipe delimited string of Gatsby Node API names and returns the first supported API name as a string\n *\n * Example input: \"onPluginInit|unstable_onPluginInit\"\n * Example output: \"onPluginInit\"\n */","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby-source-wordpress/src/utils/run-steps.ts#L45-L81","documentation":"Thrown by gatsby-source-wordpress run-steps when any step function (a source plugin build step, e.g. a node sourcing routine) throws an uncaught error during the named step. It wraps the error as code 112003 (SourcePluginCodeError), invokes leftover preview callbacks to report to WP Preview, logs the original error to stderr, and panics. It signals a bug or unhandled runtime error inside the plugin's own step code rather than in user configuration.","triggerScenarios":"A step in the source plugin's step list throws synchronously or rejects asynchronously; the try/catch in run-steps catches it and calls reporter.panic. Common when the plugin's internal helpers receive unexpected shapes from WPGraphQL (schema drift), or a third-party step is misconfigured.","commonSituations":"Updating gatsby-source-wordpress to a version incompatible with the installed WPGraphQL schema; custom step functions added via sourceNodes step arrays; race conditions in preview-state cleanup; node type definitions missing after a WP schema change.","solutions":["Read the console.error(e) output above the panic: it prints the original thrown error and stack, which identifies the failing step name and line.","Pin gatsby-source-wordpress to the version that worked, then upgrade WPGraphQL and the plugin together.","Re-run schema introspection / clear the .cache directory (rm -rf .cache node_modules/.cache) so stale type info is rebuilt.","If a custom step is failing, wrap its body in a try/catch and return a recoverable result, or remove it from the step list."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Inside your custom step, catch and surface rather than letting run-steps panic:\ntry {\n  await myStep(helpers)\n} catch (e) {\n  helpers.reporter.warn(`myStep failed, skipping: ${e.message}`)\n  // optionally re-throw only for fatal cases\n}","preventionTips":["Keep gatsby-source-wordpress and WPGraphQL versions in lockstep.","Clear .cache after schema changes on the WP side.","Wrap custom step functions in try/catch to log context before the plugin's panic runs.","Reproduce failing steps against the live WPGraphQL endpoint to isolate the cause."],"tags":["gatsby-source-wordpress","plugin","runtime-error","preview"],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}