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

use try-except block to guard against errors during json parsing. If the #790

Merged
merged 2 commits into from
Apr 3, 2023

Conversation

johker01
Copy link
Collaborator

@johker01 johker01 commented Apr 3, 2023

Summary

In some cases, error messages contain an external results URL, in other cases, they don't. This PR introduces a try-except block to catch JSONDecodeErrors. In that case, we'll return the raw result instead of trying to parse it.

Details and comments

Fixes Qiskit/qiskit-ibm-provider#554

johker01 and others added 2 commits April 3, 2023 18:39
result can't be parsed, we'll return the raw result instead.

Co-authored-by: Daniel Kaulen <dkaulen@de.ibm.com>
@kt474 kt474 added the Changelog: Bugfix Include in the Fixed section of the changelog label Apr 3, 2023
@coveralls
Copy link

Pull Request Test Coverage Report for Build 4599307202

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 67.739%

Totals Coverage Status
Change from base Build 4597866887: 0.01%
Covered Lines: 3349
Relevant Lines: 4944

💛 - Coveralls

@kt474 kt474 merged commit ba31176 into Qiskit:main Apr 3, 2023
@johker01 johker01 deleted the issue_554 branch April 4, 2023 10:25
@kt474 kt474 added this to the 0.9.3 milestone Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the Fixed section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSONDecodeError in job.error_message()
3 participants