Different error codes when retrieving store data using the GraphQL API and the REST API

Hi!

We’re migrating to the GraphQL API and have noticed that the GraphQL endpoint for retrieving store data returns a different error code than the REST API endpoint.

Specifically, while the REST API returns a 404 or 403 error for a store, GraphQL instead returns a 401 error code for the same store.

Could someone from Shopify take a look?

Thanks in advance!

Rosanna

1 Like

Hi,

indeed, we have found some closed stores for which the REST API returns a 404 error code (expected) and the GraphQL API returns a 401 error code. This way, it is not possible to know if the store keeps closed or not.

Is this te expected behavior? Or is it a bug?

Please take a look :slight_smile:

Hey folks,

Will connect with the relevant team to confirm if we need to make a change on our side.

1 Like

Hey folks - so I’ve connected with the internal product team on this and they’ve confirmed the error code for GraphQL is correct and should be 401.