{"record":{"id":"36c71cfcc8b032d4","repo":"gatsbyjs/gatsby","slug":"111005","errorCode":"111005","errorMessage":"Request failed with status code 401.\\n\\nThe HTTP Basic Auth credentials you've provided in plugin options were rejected.\\nDouble check that your credentials are correct.\\n${genericError({ url })}","messagePattern":"Request failed with status code 401\\.\\\\n\\\\nThe HTTP Basic Auth credentials you've provided in plugin options were rejected\\.\\\\nDouble check that your credentials are correct\\.\\\\n(.+?)\\)\\}","errorType":"panic","errorClass":null,"httpStatus":401,"severity":"error","filePath":"packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts","lineNumber":409,"sourceCode":"\n${getLowerRequestConcurrencyOptionMessage()}`,\n          { useVerboseStyle: true }\n        ),\n      },\n    })\n\n    return\n  }\n\n  const unauthorized = e.message.includes(`Request failed with status code 401`)\n\n  const htaccessCredentials = pluginOptions.auth.htaccess\n\n  const missingCredentials =\n    !htaccessCredentials.password || !htaccessCredentials.username\n\n  if (unauthorized && !missingCredentials) {\n    reporter.panic({\n      id: CODES.Authentication,\n      context: {\n        sourceMessage: formatLogMessage(\n          `Request failed with status code 401.\\n\\nThe HTTP Basic Auth credentials you've provided in plugin options were rejected.\\nDouble check that your credentials are correct.\n         \\n${genericError({ url })}`,\n          { useVerboseStyle: true }\n        ),\n      },\n    })\n\n    return\n  } else if (unauthorized) {\n    reporter.panic({\n      id: CODES.Authentication,\n      context: {\n        sourceMessage: formatLogMessage(\n          `Request failed with status code 401.\\n\\n Your WordPress instance may be protected with HTTP Basic authentication.\\n If it is you will need to add the following to your plugin options:\n","sourceCodeStart":391,"sourceCodeEnd":427,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts#L391-L427","documentation":"Error \"Request failed with status code 401.\\n\\nThe HTTP Basic Auth credentials you've provided in plugin options were rejected.\\nDouble check that your credentials are correct.\\n${genericError({ url })}\" thrown in gatsbyjs/gatsby.","triggerScenarios":"Thrown at packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts:409 when the library encounters an invalid state.","commonSituations":"Occurs when HTTP Basic Auth credentials in the plugin options are rejected (401). Double-check the username/password (or application password) configured for the WordPress site.","solutions":["Double check the HTTP Basic Auth credentials in the plugin options (htaccess.user and htaccess.pass).","Confirm the credentials work by curling the GraphQL endpoint with the same Authorization header.","Check server logs to see why the credentials were rejected."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}