Skip to content

✨ Handle GQL non-200 response#155

Merged
ponty33 merged 11 commits intomainfrom
fix/check-gql-response
Oct 11, 2022
Merged

✨ Handle GQL non-200 response#155
ponty33 merged 11 commits intomainfrom
fix/check-gql-response

Conversation

@ponty33
Copy link
Copy Markdown
Member

@ponty33 ponty33 commented Jul 22, 2022

close #148
doc

  • Raise exception if the response is not 200, Shopify GQL should always return 200
  • According to the doc all non-200 errors will return in this format
{
  "errors": "{Error message}"
}

@ponty33 ponty33 self-assigned this Jul 22, 2022
@ponty33 ponty33 marked this pull request as ready for review August 26, 2022 23:12
Copy link
Copy Markdown
Collaborator

@lishanl lishanl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ponty33 , it looks good. It would be great if you can add a test for it.

Comment thread spylib/admin_api.py
@hillairet
Copy link
Copy Markdown
Collaborator

@ponty33 Let's try to get this out of the way next week just to avoid stale PRs.

@ponty33
Copy link
Copy Markdown
Member Author

ponty33 commented Oct 11, 2022

@hillairet Actually it's ready for review, I don't know why it's not passing the tox

@hillairet
Copy link
Copy Markdown
Collaborator

Check the logs. That's for python 3.9:

image

@ponty33 ponty33 merged commit ecabddc into main Oct 11, 2022
@ponty33 ponty33 deleted the fix/check-gql-response branch October 11, 2022 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

execute_gql does not check the response status_code

4 participants