Skip to content

Incorrect Docs Regarding GraphQL Status Codes #362

@cbhdalton

Description

@cbhdalton

Is there an existing issue for this?

  • I have searched the existing issues

Which topic?

https://github.com/AdobeDocs/commerce-webapi/blob/main/src/pages/graphql/usage/api-response.md

What's wrong with the content?

The docs talk about GraphQL responses giving standard HTTP response codes (200, 401, 403, and 500) on queries, but I don't believe that's correct. Unless I'm missing something, Magento and Adobe Commerce always return a 200 status code for anything processed by GraphQL, or a 500 error if something wrong happened in the transport layer or if the request was malformed (e.x. missing a bracket in the body).

Even following the example given in the documentation -- querying customer info without a valid token -- returns a 200 when I test it, not the 401 that the docs say it should.

What changes do you propose?

Remove references to the 401 and 403 status codes from the documentation, or if there are queries that do result in non-200 or 500 error codes, update the docs with those examples instead.

Anything else that can help to cover this?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🆕 Ready for Grooming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions