{"record":{"id":"36aa36f52b4b5412","repo":"gatsbyjs/gatsby","slug":"gatsby-plugin-sharp-the-failonerror-option-is","errorCode":null,"errorMessage":"[gatsby-plugin-sharp]: The \"failOnError\" option is deprecated. Please use \"failOn\" instead.","messagePattern":"\\[gatsby-plugin-sharp\\]: The \"failOnError\" option is deprecated\\. Please use \"failOn\" instead\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-plugin-sharp/src/gatsby-node.js","lineNumber":250,"sourceCode":"      breakpoints: Joi.array().items(Joi.number()),\n      backgroundColor: Joi.string(),\n      transformOptions: Joi.object(),\n      tracedSVGOptions: Joi.object(),\n      blurredOptions: Joi.object(),\n      jpgOptions: Joi.object(),\n      pngOptions: Joi.object(),\n      webpOptions: Joi.object(),\n      avifOptions: Joi.object(),\n    }).description(\n      `Default options used by gatsby-plugin-image. \\nSee https://gatsbyjs.com/docs/reference/built-in-components/gatsby-plugin-image/`\n    ),\n  }).custom(value => {\n    const shouldNotFailOnError = !value.failOnError\n\n    if (shouldNotFailOnError) {\n      // show this warning only once in main process\n      if (!process.env.GATSBY_WORKER_ID) {\n        console.warn(\n          `[gatsby-plugin-sharp]: The \"failOnError\" option is deprecated. Please use \"failOn\" instead.`\n        )\n      }\n\n      return {\n        ...value,\n        failOn: `none`,\n      }\n    }\n\n    return {\n      ...value,\n    }\n  })\n","sourceCodeStart":232,"sourceCodeEnd":265,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-plugin-sharp/src/gatsby-node.js#L232-L265","documentation":"Deprecation warning raised during pluginOptionsSchema validation of gatsby-plugin-sharp: the configured options still use the legacy boolean `failOnError`, which was replaced by the `failOn` enum (e.g. 'none'/'any'/'larger'). The warning is emitted from the schema's .custom() check; the old option still maps to failOn behavior but will be removed.","triggerScenarios":"Thrown at packages/gatsby-plugin-sharp/src/gatsby-node.js:250 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Replace failOnError with failOn (e.g. failOn: \"error\"/\"warning\"/\"none\") in gatsby-plugin-sharp options"],"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-14T05:17:10.506Z"}