qiskit-documentation/docs/api/qiskit/0.26/qiskit.result.ResultError.mdx

39 lines
1.1 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: ResultError (v0.26)
description: API reference for qiskit.result.ResultError in qiskit v0.26
in_page_toc_min_heading_level: 1
python_api_type: exception
python_api_name: qiskit.result.ResultError
---
<span id="qiskit-result-resulterror" />
# qiskit.result.ResultError
<Class id="qiskit.result.ResultError" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.17/qiskit/result/exceptions.py" signature="ResultError(error)" modifiers="exception">
Exceptions raised due to errors in result output.
It may be better for the Qiskit API to raise this exception.
**Parameters**
**error** (*dict*)
This is the error record as it comes back from the API. The format is like:
```python
error = {'status': 403,
'message': 'Your credits are not enough.',
'code': 'MAX_CREDITS_EXCEEDED'}
```
Set the error message.
### with\_traceback
<Function id="qiskit.result.ResultError.with_traceback" signature="with_traceback()">
Exception.with\_traceback(tb) set self.\_\_traceback\_\_ to tb and return self.
</Function>
</Class>