Skip to content

Commit

Permalink
Don't convert error messages to uppercase (#1054)
Browse files Browse the repository at this point in the history
* Don't convert error messages to uppercase

* refactor, add reno

* fix logic
  • Loading branch information
kt474 authored Sep 5, 2023
1 parent e308d3a commit f31de2e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion qiskit_ibm_runtime/runtime_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,11 @@ def _set_status(self, job_response: Dict) -> None:
try:
reason = job_response["state"].get("reason")
if reason:
self._reason = job_response["state"]["reason"].upper()
# TODO remove this in https://github.com/Qiskit/qiskit-ibm-runtime/issues/989
if reason.upper() == "RAN TOO LONG":
self._reason = reason.upper()
else:
self._reason = reason
self._status = self._status_from_job_response(job_response)
except KeyError:
raise IBMError(f"Unknown status: {job_response['state']['status']}")
Expand Down
4 changes: 4 additions & 0 deletions releasenotes/notes/error-message-case-31b4b2b7a5a2f624.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
fixes:
- |
Job error messages will no longer be returned in all uppercase.

0 comments on commit f31de2e

Please sign in to comment.