Errors

See Errors, waiting and limits for when each is raised.

exception lunaspace.LunaError

An error of the API, or of the client’s use of it.

__init__(message, *, status=None, code=None, detail=None)
Parameters:
  • message (str)

  • status (int | None)

  • code (str | None)

  • detail (Any)

exception lunaspace.AuthenticationError

401: the API key is missing, unknown or revoked.

exception lunaspace.ConfigurationError

The client cannot start: no API key, for one.

exception lunaspace.FeatureNotIncluded

403 feature_not_included: the organisation’s tier does not include the feature (.feature).

property feature: str | None
exception lunaspace.InvalidRequest

400 or 422: the API refused what was asked, and says why.

exception lunaspace.JobFailed

A job waited for (a run, passes, a TLE, a plan) failed. .job is the job; .code the API’s error code, such as invalid_tracking_data, estimation_failed or fit_failed.

__init__(job, kind='job')
Parameters:
exception lunaspace.NotFound

404: no such resource, or one of another organisation’s.

exception lunaspace.PermissionDenied
exception lunaspace.RunFailed

A run waited for failed. .run is the run.

__init__(run)
Parameters:

run (Run)

exception lunaspace.ServerError

5xx: the service’s fault; worth trying again later.

exception lunaspace.WaitTimeout

A job waited for was not finished in time. .last is its last state.

__init__(message, last)
Parameters: