Gå til indholdet

digna Python SDK Errors 2026.06

This page documents the exception hierarchy exposed by the digna Python SDK. These errors cover API failures, authentication and authorization problems, and resource-not-found conditions.

All errors raised by the SDK derive from DignaError.

digna_sdk.exceptions

Exceptions raised by the Digna SDK.

DignaAPIError(status_code, code, message)

Bases: DignaError

Raised when the Digna API returns an error response.

Attributes:

Name Type Description
status_code

The HTTP status code of the response.

code

The machine-readable error code reported by the API, if any.

message

The human-readable error message reported by the API.

code = code instance-attribute

message = message instance-attribute

status_code = status_code instance-attribute

DignaAuthenticationError(status_code, code, message)

Bases: DignaAPIError

Raised for 401 responses (missing/invalid credentials).

DignaAuthorizationError(status_code, code, message)

Bases: DignaAPIError

Raised for 403 responses (authenticated but not permitted).

DignaConnectionError

Bases: DignaError

Raised when the SDK could not reach the Digna backend.

DignaError

Bases: Exception

Base class for all errors raised by the Digna SDK.

DignaInspectionRequestFailed(inspection_request_id, status)

Bases: DignaError

Raised by InspectionRequestsResource.wait_until_finished when an inspection request reaches a non-successful terminal state (FAILED, ABORTED, or CANCELLED).

inspection_request_id = inspection_request_id instance-attribute

status = status instance-attribute

DignaNotFoundError(status_code, code, message)

Bases: DignaAPIError

Raised for 404 responses.