backend.globaleaks.rest.errors

Module Contents

exception backend.globaleaks.rest.errors.GLException[source]

Bases: Exception

Common base class for all non-exit exceptions.

reason = GLTypesError not set[source]
log_message = GLException[source]
error_code = 0[source]
status_code = 500[source]
__str__(self)[source]

Return str(self).

__repr__(self)[source]

Return repr(self).

exception backend.globaleaks.rest.errors.InternalServerError(error_str)[source]

Bases: backend.globaleaks.rest.errors.GLException

The context_id used does not exist in the database.

error_code = 1[source]
status_code = 500[source]
exception backend.globaleaks.rest.errors.MethodNotImplemented[source]

Bases: backend.globaleaks.rest.errors.GLException

The expected format described in the REST specification is not respected by the data body in the HTTP request.

error_code = 2[source]
status_code = 501[source]
exception backend.globaleaks.rest.errors.InputValidationError(error='')[source]

Bases: backend.globaleaks.rest.errors.GLException

Error on input validation

error_code = 3[source]
status_code = 406[source]
exception backend.globaleaks.rest.errors.TwoFactorAuthCodeRequired[source]

Bases: backend.globaleaks.rest.errors.GLException

Error signaling need for two factor auth token

reason = Two Factor authentication required[source]
error_code = 4[source]
status_code = 300[source]
exception backend.globaleaks.rest.errors.HTTPAuthenticationRequired[source]

Bases: backend.globaleaks.rest.errors.GLException

Basic Authentication Required

reason = Basic Authentication Required[source]
error_code = 5[source]
status_code = 401[source]
exception backend.globaleaks.rest.errors.ResourceNotFound[source]

Bases: backend.globaleaks.rest.errors.GLException

Resource not found

reason = Resource not found[source]
error_code = 6[source]
status_code = 404[source]
exception backend.globaleaks.rest.errors.ModelNotFound(model)[source]

Bases: backend.globaleaks.rest.errors.ResourceNotFound

Error class for a generic model

error_code = 7[source]
status_code = 404[source]
exception backend.globaleaks.rest.errors.ForbiddenOperation[source]

Bases: backend.globaleaks.rest.errors.GLException

A user has tried one operation not permitted by their privileges

reason = Operation Forbidden[source]
error_code = 8[source]
status_code = 403[source]
exception backend.globaleaks.rest.errors.InvalidAuthentication[source]

Bases: backend.globaleaks.rest.errors.GLException

An invalid request was presented

reason = Authentication Failed[source]
error_code = 9[source]
status_code = 401[source]
exception backend.globaleaks.rest.errors.NotAuthenticated[source]

Bases: backend.globaleaks.rest.errors.GLException

The user attempted to access a not-authorized request. The output messages may contain reasons about the Authentication failure, but they are specify only if users has show knowledge of good credentials.

error_code = 10[source]
status_code = 412[source]
reason = Not Authenticated[source]
exception backend.globaleaks.rest.errors.PasswordReuseError[source]

Bases: backend.globaleaks.rest.errors.GLException

Error signaling that the choosen new password is already used

reason = The new password must differ from the previous.[source]
error_code = 11[source]
status_code = 406[source]
exception backend.globaleaks.rest.errors.InvalidOldPassword[source]

Bases: backend.globaleaks.rest.errors.GLException

Error signaling that the provided old password is wrong

reason = The specified old password is not valid[source]
error_code = 12[source]
status_code = 406[source]
exception backend.globaleaks.rest.errors.InvalidTwoFactorAuthCode[source]

Bases: backend.globaleaks.rest.errors.GLException

Error signaling that the inserted two factor auth token is wrong

reason = Two Factor authentication required[source]
error_code = 13[source]
status_code = 406[source]
exception backend.globaleaks.rest.errors.TorNetworkRequired[source]

Bases: backend.globaleaks.rest.errors.GLException

A connection receiver not via Tor network is required to be enforced with anonymity

reason = Resource can be accessed only within Tor network[source]
error_code = 13[source]
status_code = 403[source]
exception backend.globaleaks.rest.errors.FileTooBig(size_limit)[source]

Bases: backend.globaleaks.rest.errors.GLException

Raised when the uploaded file is bigger than acceptable

error_code = 13[source]
status_code = 413[source]
exception backend.globaleaks.rest.errors.DirectoryTraversalError[source]

Bases: backend.globaleaks.rest.errors.GLException

Blocked file operation out of the expected path

reason = Blocked file operation out of the expected path[source]
error_code = 14[source]
status_code = 403[source]
exception backend.globaleaks.rest.errors.SubmissionDisabled[source]

Bases: backend.globaleaks.rest.errors.GLException

Common base class for all non-exit exceptions.

reason = Submissions are disabled[source]
error_code = 15[source]
status_code = 503[source]
exception backend.globaleaks.rest.errors.AccessLocationInvalid[source]

Bases: backend.globaleaks.rest.errors.GLException

Common base class for all non-exit exceptions.

reason = IP Address not allows to login from this location[source]
error_code = 16[source]
status_code = 401[source]
exception backend.globaleaks.rest.errors.SessionExpired[source]

Bases: backend.globaleaks.rest.errors.GLException

Common base class for all non-exit exceptions.

reason = Session expired[source]
error_code = 17[source]
status_code = 401[source]