qbraid.runtime.RuntimeAPIError
- exception RuntimeAPIError(message, status_code=None, error_code=None, trace=None, solution=None, more_info=None)[source]
Exception raised when a provider’s REST API returns an error response.
Carries the HTTP status code so callers can branch on the failure mode (e.g. distinguish “job doesn’t exist” from “credentials rejected”) instead of string-matching the exception message.
Where the provider returns a structured error body,
error_codeholds the provider’s own error identifier (finer-grained than the HTTP status),tracethe request id to quote in a support ticket,solutionthe provider’s user-facing remediation text, andmore_infoa link to its error docs. All are None when the provider returned no structured error.solutionis a suggestion from the provider, not gospel: it may be stale, may contain markup, and may reference the provider’s own SDK rather than the caller’s. Present it to users deliberately, not blindly.Note: this also subclasses
ValueErrorbecause these provider paths previously raised a bareValueError. Keeping that base means existingexcept ValueErrorcode keeps working. It is transitional and can be dropped in a future major release.