Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions qiskit_ibm_runtime/runtime_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,13 @@ def _error_msg_from_job_response(self, response: Dict) -> str:
job_result_raw = self._download_external_result(
self._api_client.job_results(job_id=self.job_id())
)
index = job_result_raw.rfind("Traceback")
if index != -1:
job_result_raw = job_result_raw[index:]

try:
index = job_result_raw.rfind("Traceback")
if index != -1:
job_result_raw = job_result_raw[index:]
except TypeError:
pass
Comment thread
kt474 marked this conversation as resolved.
Outdated

if status == "CANCELLED" and self._reason == "RAN TOO LONG":
error_msg = API_TO_JOB_ERROR_MESSAGE["CANCELLED - RAN TOO LONG"]
Expand Down
6 changes: 6 additions & 0 deletions releasenotes/notes/byte-result-bug-7afb5abe813f5b1b.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Fixed an issue where canceled and failed jobs would return an invalid result that
resulted in a type error, preventing the actual error from being returned
to the user.