gatsbyjs/gatsby · error

111005

111005

Error message

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 })}

What it means

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.

Source

Thrown at packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts:409

${getLowerRequestConcurrencyOptionMessage()}`,
          { useVerboseStyle: true }
        ),
      },
    })

    return
  }

  const unauthorized = e.message.includes(`Request failed with status code 401`)

  const htaccessCredentials = pluginOptions.auth.htaccess

  const missingCredentials =
    !htaccessCredentials.password || !htaccessCredentials.username

  if (unauthorized && !missingCredentials) {
    reporter.panic({
      id: CODES.Authentication,
      context: {
        sourceMessage: formatLogMessage(
          `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 })}`,
          { useVerboseStyle: true }
        ),
      },
    })

    return
  } else if (unauthorized) {
    reporter.panic({
      id: CODES.Authentication,
      context: {
        sourceMessage: formatLogMessage(
          `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:

View on GitHub (pinned to 8b06340921)

Solutions

  1. Double check the HTTP Basic Auth credentials in the plugin options (htaccess.user and htaccess.pass).
  2. Confirm the credentials work by curling the GraphQL endpoint with the same Authorization header.
  3. Check server logs to see why the credentials were rejected.

When it happens

Trigger: Thrown at packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts:409 when the library encounters an invalid state.

Common situations: 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.

Understand the failure class


AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13). Data as JSON: /api/errors/36c71cfcc8b032d4. Report an issue: GitHub.