Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IonQ: Include json body of error response when possible #5349

Merged
merged 15 commits into from
Jun 6, 2022

Conversation

Cynocracy
Copy link
Contributor

No description provided.

@CirqBot CirqBot added the Size: XS <10 lines changed label May 11, 2022
@Cynocracy Cynocracy changed the title IonQ: Include json body of error when possible IonQ: Include json body of error response when possible May 11, 2022
@ColemanCollins
Copy link
Collaborator

love good error messages

error = {}
try:
error = response.json()
except json.decoder.JSONDecodeError:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this will reference json from the parameter. Probably best solution is to import json.decoder as jd or something like that and then us that reference here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ha, right! Thanks for catching

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thinking about this more, I probably shouldn't coverage ignore the except case if I already did a bug

Copy link
Collaborator

@dabacon dabacon left a comment

Choose a reason for hiding this comment

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

LGTM

@dabacon dabacon added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Jun 6, 2022
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Jun 6, 2022
@dabacon dabacon merged commit f28361a into quantumlib:master Jun 6, 2022
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. Size: XS <10 lines changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants