Errors¶
The full OcxMirrorError hierarchy. See
Guide → Error handling for the catch
recipes.
OcxMirrorError¶
ocx_mirror_sdk.errors.OcxMirrorError
¶
Bases: Exception
Base class for every exception raised from ocx_mirror_sdk.
Catch this to recover from any SDK-level failure::
try:
list_releases("owner", "repo")
except OcxMirrorError as e:
log.warning("SDK call failed: %s", e)
ConfigurationError¶
ocx_mirror_sdk.errors.ConfigurationError
¶
Bases: OcxMirrorError
Required configuration is missing or invalid.
Examples: GITHUB_TOKEN not set when required, github3 client
failed to initialize. Not retryable.
TransportError¶
ocx_mirror_sdk.errors.TransportError
¶
Bases: OcxMirrorError
Base class for network / transport failures (retry candidates).
HttpStatusError¶
ocx_mirror_sdk.errors.HttpStatusError
¶
Bases: TransportError
An HTTP response carried a non-2xx status code.
| ATTRIBUTE | DESCRIPTION |
|---|---|
status_code |
HTTP status code.
|
url |
Absolute request URL.
|
response_text |
First 1000 chars of the response body, or
|
Source code in src/ocx_mirror_sdk/errors.py
HttpTimeoutError¶
ocx_mirror_sdk.errors.HttpTimeoutError
¶
Bases: TransportError
The request did not complete within the configured timeout.
| ATTRIBUTE | DESCRIPTION |
|---|---|
url |
Absolute request URL.
|
Source code in src/ocx_mirror_sdk/errors.py
ApiResponseError¶
ocx_mirror_sdk.errors.ApiResponseError
¶
Bases: OcxMirrorError
The server responded but the payload is unusable.
Examples: malformed JSON, GraphQL errors array, REST repository
not found.
| ATTRIBUTE | DESCRIPTION |
|---|---|
payload |
Raw payload echoed for diagnostics.
|
Source code in src/ocx_mirror_sdk/errors.py
SchemaError¶
ocx_mirror_sdk.errors.SchemaError
¶
Bases: OcxMirrorError
Input data did not match the expected schema.
Raised when :meth:Release.from_dict encounters missing or wrongly
typed fields.
| ATTRIBUTE | DESCRIPTION |
|---|---|
field |
Name of the offending field, or
|
Source code in src/ocx_mirror_sdk/errors.py
CacheError¶
ocx_mirror_sdk.errors.CacheError
¶
Bases: OcxMirrorError
An on-disk cache operation failed.
Cache misses are not errors (see :meth:FileCache.get which
returns None). This class is reserved for genuinely abnormal
events: corrupt JSON, IO failure, permission denied.
| ATTRIBUTE | DESCRIPTION |
|---|---|
path |
The on-disk path that triggered the failure, or
|