Errors¶
The models/errors subpackage defines the custom exception hierarchy for ArchiPy. All errors subclass BaseError and
are organized by domain: authentication, authorization, validation, resource management, networking, database, system,
Keycloak, and Temporal.
Base Error¶
The root BaseError class that all ArchiPy exceptions inherit from, providing structured error codes and context.
Base error types for ArchiPy.
archipy.models.errors.base_error.BaseError ¶
Bases: Exception
Base exception class for all custom errors.
This class provides a standardized way to handle errors with support for: - Localization of error messages - Additional context data - Integration with HTTP and gRPC status codes - Template string formatting for dynamic message formatting (using {variable} placeholders) - Text normalization and Persian number conversion
Subclasses should define the following class attributes
code (ClassVar[str]): Error code identifier message_en (ClassVar[str]): English error message (can use {variable} placeholders) message_fa (ClassVar[str]): Persian error message (can use {variable} placeholders) http_status (ClassVar[int]): HTTP status code grpc_status (ClassVar[int]): gRPC status code
Source code in archipy/models/errors/base_error.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
archipy.models.errors.base_error.BaseError.message_en
class-attribute
¶
archipy.models.errors.base_error.BaseError.message_fa
class-attribute
¶
archipy.models.errors.base_error.BaseError.lang
instance-attribute
¶
archipy.models.errors.base_error.BaseError.additional_data
instance-attribute
¶
archipy.models.errors.base_error.BaseError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.base_error.BaseError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.base_error.BaseError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
options: show_root_toc_entry: false heading_level: 3
Auth Errors¶
Exceptions for authentication and authorization failures.
Authentication and authorization error types.
archipy.models.errors.auth_errors.UnauthenticatedError ¶
Bases: BaseError
Exception raised when a user is unauthenticated.
Source code in archipy/models/errors/auth_errors.py
archipy.models.errors.auth_errors.UnauthenticatedError.code
class-attribute
¶
archipy.models.errors.auth_errors.UnauthenticatedError.message_en
class-attribute
¶
archipy.models.errors.auth_errors.UnauthenticatedError.message_fa
class-attribute
¶
archipy.models.errors.auth_errors.UnauthenticatedError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.UNAUTHORIZED.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 401
)
archipy.models.errors.auth_errors.UnauthenticatedError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.UNAUTHENTICATED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.UNAUTHENTICATED.value, tuple)
else StatusCode.UNAUTHENTICATED.value
if GRPC_AVAILABLE
and StatusCode is not None
and StatusCode is not None
else 16
)
archipy.models.errors.auth_errors.UnauthenticatedError.lang
instance-attribute
¶
archipy.models.errors.auth_errors.UnauthenticatedError.additional_data
instance-attribute
¶
archipy.models.errors.auth_errors.UnauthenticatedError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.auth_errors.UnauthenticatedError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.auth_errors.UnauthenticatedError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.auth_errors.InvalidCredentialsError ¶
Bases: BaseError
Exception raised for invalid credentials.
Source code in archipy/models/errors/auth_errors.py
archipy.models.errors.auth_errors.InvalidCredentialsError.code
class-attribute
¶
archipy.models.errors.auth_errors.InvalidCredentialsError.message_en
class-attribute
¶
archipy.models.errors.auth_errors.InvalidCredentialsError.message_fa
class-attribute
¶
archipy.models.errors.auth_errors.InvalidCredentialsError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.UNAUTHORIZED.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 401
)
archipy.models.errors.auth_errors.InvalidCredentialsError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.UNAUTHENTICATED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.UNAUTHENTICATED.value, tuple)
else StatusCode.UNAUTHENTICATED.value
if GRPC_AVAILABLE
and StatusCode is not None
and StatusCode is not None
else 16
)
archipy.models.errors.auth_errors.InvalidCredentialsError.lang
instance-attribute
¶
archipy.models.errors.auth_errors.InvalidCredentialsError.additional_data
instance-attribute
¶
archipy.models.errors.auth_errors.InvalidCredentialsError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.auth_errors.InvalidCredentialsError.get_message ¶
Gets the localized error message with username.
Source code in archipy/models/errors/auth_errors.py
archipy.models.errors.auth_errors.InvalidCredentialsError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.auth_errors.TokenExpiredError ¶
Bases: BaseError
Exception raised when a token has expired.
Source code in archipy/models/errors/auth_errors.py
archipy.models.errors.auth_errors.TokenExpiredError.code
class-attribute
¶
archipy.models.errors.auth_errors.TokenExpiredError.message_en
class-attribute
¶
archipy.models.errors.auth_errors.TokenExpiredError.message_fa
class-attribute
¶
archipy.models.errors.auth_errors.TokenExpiredError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.UNAUTHORIZED.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 401
)
archipy.models.errors.auth_errors.TokenExpiredError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.UNAUTHENTICATED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.UNAUTHENTICATED.value, tuple)
else StatusCode.UNAUTHENTICATED.value
if GRPC_AVAILABLE
and StatusCode is not None
and StatusCode is not None
else 16
)
archipy.models.errors.auth_errors.TokenExpiredError.lang
instance-attribute
¶
archipy.models.errors.auth_errors.TokenExpiredError.additional_data
instance-attribute
¶
archipy.models.errors.auth_errors.TokenExpiredError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.auth_errors.TokenExpiredError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.auth_errors.TokenExpiredError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.auth_errors.InvalidTokenError ¶
Bases: BaseError
Exception raised when a token is invalid.
Source code in archipy/models/errors/auth_errors.py
archipy.models.errors.auth_errors.InvalidTokenError.code
class-attribute
¶
archipy.models.errors.auth_errors.InvalidTokenError.message_en
class-attribute
¶
archipy.models.errors.auth_errors.InvalidTokenError.message_fa
class-attribute
¶
archipy.models.errors.auth_errors.InvalidTokenError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.UNAUTHORIZED.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 401
)
archipy.models.errors.auth_errors.InvalidTokenError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.UNAUTHENTICATED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.UNAUTHENTICATED.value, tuple)
else StatusCode.UNAUTHENTICATED.value
if GRPC_AVAILABLE
and StatusCode is not None
and StatusCode is not None
else 16
)
archipy.models.errors.auth_errors.InvalidTokenError.lang
instance-attribute
¶
archipy.models.errors.auth_errors.InvalidTokenError.additional_data
instance-attribute
¶
archipy.models.errors.auth_errors.InvalidTokenError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.auth_errors.InvalidTokenError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.auth_errors.InvalidTokenError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.auth_errors.SessionExpiredError ¶
Bases: BaseError
Exception raised when a session has expired.
Source code in archipy/models/errors/auth_errors.py
archipy.models.errors.auth_errors.SessionExpiredError.code
class-attribute
¶
archipy.models.errors.auth_errors.SessionExpiredError.message_en
class-attribute
¶
archipy.models.errors.auth_errors.SessionExpiredError.message_fa
class-attribute
¶
archipy.models.errors.auth_errors.SessionExpiredError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.UNAUTHORIZED.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 401
)
archipy.models.errors.auth_errors.SessionExpiredError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.UNAUTHENTICATED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.UNAUTHENTICATED.value, tuple)
else StatusCode.UNAUTHENTICATED.value
if GRPC_AVAILABLE
and StatusCode is not None
and StatusCode is not None
else 16
)
archipy.models.errors.auth_errors.SessionExpiredError.lang
instance-attribute
¶
archipy.models.errors.auth_errors.SessionExpiredError.additional_data
instance-attribute
¶
archipy.models.errors.auth_errors.SessionExpiredError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.auth_errors.SessionExpiredError.get_message ¶
Gets the localized error message with session ID.
Source code in archipy/models/errors/auth_errors.py
archipy.models.errors.auth_errors.SessionExpiredError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.auth_errors.PermissionDeniedError ¶
Bases: BaseError
Exception raised when permission is denied.
Source code in archipy/models/errors/auth_errors.py
archipy.models.errors.auth_errors.PermissionDeniedError.code
class-attribute
¶
archipy.models.errors.auth_errors.PermissionDeniedError.message_en
class-attribute
¶
archipy.models.errors.auth_errors.PermissionDeniedError.message_fa
class-attribute
¶
archipy.models.errors.auth_errors.PermissionDeniedError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.FORBIDDEN.value
if HTTP_AVAILABLE
and HTTPStatus is not None
and HTTPStatus is not None
else 403
)
archipy.models.errors.auth_errors.PermissionDeniedError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.PERMISSION_DENIED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.PERMISSION_DENIED.value, tuple
)
else StatusCode.PERMISSION_DENIED.value
if GRPC_AVAILABLE
and StatusCode is not None
and StatusCode is not None
else 7
)
archipy.models.errors.auth_errors.PermissionDeniedError.lang
instance-attribute
¶
archipy.models.errors.auth_errors.PermissionDeniedError.additional_data
instance-attribute
¶
archipy.models.errors.auth_errors.PermissionDeniedError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.auth_errors.PermissionDeniedError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.auth_errors.PermissionDeniedError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.auth_errors.AccountLockedError ¶
Bases: BaseError
Exception raised when an account is locked.
Source code in archipy/models/errors/auth_errors.py
archipy.models.errors.auth_errors.AccountLockedError.code
class-attribute
¶
archipy.models.errors.auth_errors.AccountLockedError.message_en
class-attribute
¶
archipy.models.errors.auth_errors.AccountLockedError.message_fa
class-attribute
¶
archipy.models.errors.auth_errors.AccountLockedError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.FORBIDDEN.value
if HTTP_AVAILABLE
and HTTPStatus is not None
and HTTPStatus is not None
else 403
)
archipy.models.errors.auth_errors.AccountLockedError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.PERMISSION_DENIED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.PERMISSION_DENIED.value, tuple
)
else StatusCode.PERMISSION_DENIED.value
if GRPC_AVAILABLE
and StatusCode is not None
and StatusCode is not None
else 7
)
archipy.models.errors.auth_errors.AccountLockedError.lang
instance-attribute
¶
archipy.models.errors.auth_errors.AccountLockedError.additional_data
instance-attribute
¶
archipy.models.errors.auth_errors.AccountLockedError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.auth_errors.AccountLockedError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.auth_errors.AccountLockedError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.auth_errors.AccountDisabledError ¶
Bases: BaseError
Exception raised when an account is disabled.
Source code in archipy/models/errors/auth_errors.py
archipy.models.errors.auth_errors.AccountDisabledError.code
class-attribute
¶
archipy.models.errors.auth_errors.AccountDisabledError.message_en
class-attribute
¶
archipy.models.errors.auth_errors.AccountDisabledError.message_fa
class-attribute
¶
archipy.models.errors.auth_errors.AccountDisabledError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.FORBIDDEN.value
if HTTP_AVAILABLE
and HTTPStatus is not None
and HTTPStatus is not None
else 403
)
archipy.models.errors.auth_errors.AccountDisabledError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.PERMISSION_DENIED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.PERMISSION_DENIED.value, tuple
)
else StatusCode.PERMISSION_DENIED.value
if GRPC_AVAILABLE
and StatusCode is not None
and StatusCode is not None
else 7
)
archipy.models.errors.auth_errors.AccountDisabledError.lang
instance-attribute
¶
archipy.models.errors.auth_errors.AccountDisabledError.additional_data
instance-attribute
¶
archipy.models.errors.auth_errors.AccountDisabledError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.auth_errors.AccountDisabledError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.auth_errors.AccountDisabledError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.auth_errors.InvalidVerificationCodeError ¶
Bases: BaseError
Exception raised when a verification code is invalid.
Source code in archipy/models/errors/auth_errors.py
archipy.models.errors.auth_errors.InvalidVerificationCodeError.code
class-attribute
¶
archipy.models.errors.auth_errors.InvalidVerificationCodeError.message_en
class-attribute
¶
archipy.models.errors.auth_errors.InvalidVerificationCodeError.message_fa
class-attribute
¶
archipy.models.errors.auth_errors.InvalidVerificationCodeError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE
and HTTPStatus is not None
and HTTPStatus is not None
else 400
)
archipy.models.errors.auth_errors.InvalidVerificationCodeError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE
and StatusCode is not None
and StatusCode is not None
else 3
)
archipy.models.errors.auth_errors.InvalidVerificationCodeError.lang
instance-attribute
¶
archipy.models.errors.auth_errors.InvalidVerificationCodeError.additional_data
instance-attribute
¶
archipy.models.errors.auth_errors.InvalidVerificationCodeError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.auth_errors.InvalidVerificationCodeError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.auth_errors.InvalidVerificationCodeError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
options: show_root_toc_entry: false heading_level: 3
Validation Errors¶
Exceptions for input validation and data integrity failures.
Validation error types.
archipy.models.errors.validation_errors.InvalidArgumentError ¶
Bases: BaseError
Exception raised for invalid arguments.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidArgumentError.code
class-attribute
¶
archipy.models.errors.validation_errors.InvalidArgumentError.message_en
class-attribute
¶
archipy.models.errors.validation_errors.InvalidArgumentError.message_fa
class-attribute
¶
archipy.models.errors.validation_errors.InvalidArgumentError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.validation_errors.InvalidArgumentError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE and StatusCode is not None
else 3
)
archipy.models.errors.validation_errors.InvalidArgumentError.lang
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidArgumentError.additional_data
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidArgumentError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.validation_errors.InvalidArgumentError.get_message ¶
Gets the localized error message with argument name.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidArgumentError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidFormatError ¶
Bases: BaseError
Exception raised for invalid data formats.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidFormatError.code
class-attribute
¶
archipy.models.errors.validation_errors.InvalidFormatError.message_en
class-attribute
¶
archipy.models.errors.validation_errors.InvalidFormatError.message_fa
class-attribute
¶
archipy.models.errors.validation_errors.InvalidFormatError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.validation_errors.InvalidFormatError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE and StatusCode is not None
else 3
)
archipy.models.errors.validation_errors.InvalidFormatError.lang
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidFormatError.additional_data
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidFormatError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.validation_errors.InvalidFormatError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidFormatError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidEmailError ¶
Bases: BaseError
Exception raised for invalid email formats.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidEmailError.code
class-attribute
¶
archipy.models.errors.validation_errors.InvalidEmailError.message_en
class-attribute
¶
archipy.models.errors.validation_errors.InvalidEmailError.message_fa
class-attribute
¶
archipy.models.errors.validation_errors.InvalidEmailError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.validation_errors.InvalidEmailError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE and StatusCode is not None
else 3
)
archipy.models.errors.validation_errors.InvalidEmailError.lang
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidEmailError.additional_data
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidEmailError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.validation_errors.InvalidEmailError.get_message ¶
Gets the localized error message with email.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidEmailError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidPhoneNumberError ¶
Bases: BaseError
Exception raised for invalid phone numbers.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidPhoneNumberError.code
class-attribute
¶
archipy.models.errors.validation_errors.InvalidPhoneNumberError.message_en
class-attribute
¶
archipy.models.errors.validation_errors.InvalidPhoneNumberError.message_fa
class-attribute
¶
archipy.models.errors.validation_errors.InvalidPhoneNumberError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.validation_errors.InvalidPhoneNumberError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE and StatusCode is not None
else 3
)
archipy.models.errors.validation_errors.InvalidPhoneNumberError.lang
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidPhoneNumberError.additional_data
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidPhoneNumberError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.validation_errors.InvalidPhoneNumberError.get_message ¶
Gets the localized error message with phone number and normalization.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidPhoneNumberError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidLandlineNumberError ¶
Bases: BaseError
Exception raised for invalid landline numbers.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidLandlineNumberError.code
class-attribute
¶
archipy.models.errors.validation_errors.InvalidLandlineNumberError.message_en
class-attribute
¶
archipy.models.errors.validation_errors.InvalidLandlineNumberError.message_fa
class-attribute
¶
archipy.models.errors.validation_errors.InvalidLandlineNumberError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.validation_errors.InvalidLandlineNumberError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE and StatusCode is not None
else 3
)
archipy.models.errors.validation_errors.InvalidLandlineNumberError.lang
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidLandlineNumberError.additional_data
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidLandlineNumberError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.validation_errors.InvalidLandlineNumberError.get_message ¶
Gets the localized error message with landline number and normalization.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidLandlineNumberError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidNationalCodeError ¶
Bases: BaseError
Exception raised for invalid national codes.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidNationalCodeError.code
class-attribute
¶
archipy.models.errors.validation_errors.InvalidNationalCodeError.message_en
class-attribute
¶
archipy.models.errors.validation_errors.InvalidNationalCodeError.message_fa
class-attribute
¶
archipy.models.errors.validation_errors.InvalidNationalCodeError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.validation_errors.InvalidNationalCodeError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE and StatusCode is not None
else 3
)
archipy.models.errors.validation_errors.InvalidNationalCodeError.lang
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidNationalCodeError.additional_data
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidNationalCodeError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.validation_errors.InvalidNationalCodeError.get_message ¶
Gets the localized error message with national code and normalization.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidNationalCodeError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidPasswordError ¶
Bases: BaseError
Exception raised when a password does not meet the security requirements.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidPasswordError.code
class-attribute
¶
archipy.models.errors.validation_errors.InvalidPasswordError.message_en
class-attribute
¶
archipy.models.errors.validation_errors.InvalidPasswordError.message_fa
class-attribute
¶
archipy.models.errors.validation_errors.InvalidPasswordError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.validation_errors.InvalidPasswordError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE and StatusCode is not None
else 3
)
archipy.models.errors.validation_errors.InvalidPasswordError.lang
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidPasswordError.additional_data
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidPasswordError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.validation_errors.InvalidPasswordError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidPasswordError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidDateError ¶
Bases: BaseError
Exception raised for invalid date formats.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidDateError.code
class-attribute
¶
archipy.models.errors.validation_errors.InvalidDateError.message_en
class-attribute
¶
archipy.models.errors.validation_errors.InvalidDateError.message_fa
class-attribute
¶
archipy.models.errors.validation_errors.InvalidDateError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.validation_errors.InvalidDateError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE and StatusCode is not None
else 3
)
archipy.models.errors.validation_errors.InvalidDateError.lang
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidDateError.additional_data
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidDateError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.validation_errors.InvalidDateError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidDateError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidUrlError ¶
Bases: BaseError
Exception raised for invalid URL formats.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidUrlError.code
class-attribute
¶
archipy.models.errors.validation_errors.InvalidUrlError.message_en
class-attribute
¶
archipy.models.errors.validation_errors.InvalidUrlError.message_fa
class-attribute
¶
archipy.models.errors.validation_errors.InvalidUrlError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.validation_errors.InvalidUrlError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE and StatusCode is not None
else 3
)
archipy.models.errors.validation_errors.InvalidUrlError.lang
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidUrlError.additional_data
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidUrlError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.validation_errors.InvalidUrlError.get_message ¶
Gets the localized error message with URL.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidUrlError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidIpError ¶
Bases: BaseError
Exception raised for invalid IP address formats.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidIpError.code
class-attribute
¶
archipy.models.errors.validation_errors.InvalidIpError.message_en
class-attribute
¶
archipy.models.errors.validation_errors.InvalidIpError.message_fa
class-attribute
¶
archipy.models.errors.validation_errors.InvalidIpError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.validation_errors.InvalidIpError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE and StatusCode is not None
else 3
)
archipy.models.errors.validation_errors.InvalidIpError.lang
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidIpError.additional_data
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidIpError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.validation_errors.InvalidIpError.get_message ¶
Gets the localized error message with IP address.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidIpError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidJsonError ¶
Bases: BaseError
Exception raised for invalid JSON formats.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidJsonError.code
class-attribute
¶
archipy.models.errors.validation_errors.InvalidJsonError.message_en
class-attribute
¶
archipy.models.errors.validation_errors.InvalidJsonError.message_fa
class-attribute
¶
archipy.models.errors.validation_errors.InvalidJsonError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.validation_errors.InvalidJsonError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE and StatusCode is not None
else 3
)
archipy.models.errors.validation_errors.InvalidJsonError.lang
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidJsonError.additional_data
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidJsonError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.validation_errors.InvalidJsonError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidJsonError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidTimestampError ¶
Bases: BaseError
Exception raised when a timestamp format is invalid.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.InvalidTimestampError.code
class-attribute
¶
archipy.models.errors.validation_errors.InvalidTimestampError.message_en
class-attribute
¶
archipy.models.errors.validation_errors.InvalidTimestampError.message_fa
class-attribute
¶
archipy.models.errors.validation_errors.InvalidTimestampError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.validation_errors.InvalidTimestampError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE and StatusCode is not None
else 3
)
archipy.models.errors.validation_errors.InvalidTimestampError.lang
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidTimestampError.additional_data
instance-attribute
¶
archipy.models.errors.validation_errors.InvalidTimestampError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.validation_errors.InvalidTimestampError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.InvalidTimestampError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.OutOfRangeError ¶
Bases: BaseError
Exception raised when a value is out of range.
Source code in archipy/models/errors/validation_errors.py
archipy.models.errors.validation_errors.OutOfRangeError.code
class-attribute
¶
archipy.models.errors.validation_errors.OutOfRangeError.message_en
class-attribute
¶
archipy.models.errors.validation_errors.OutOfRangeError.message_fa
class-attribute
¶
archipy.models.errors.validation_errors.OutOfRangeError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.validation_errors.OutOfRangeError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.OUT_OF_RANGE.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.OUT_OF_RANGE.value, tuple)
else StatusCode.OUT_OF_RANGE.value
if GRPC_AVAILABLE and StatusCode is not None
else 11
)
archipy.models.errors.validation_errors.OutOfRangeError.lang
instance-attribute
¶
archipy.models.errors.validation_errors.OutOfRangeError.additional_data
instance-attribute
¶
archipy.models.errors.validation_errors.OutOfRangeError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.validation_errors.OutOfRangeError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.validation_errors.OutOfRangeError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
options: show_root_toc_entry: false heading_level: 3
Resource Errors¶
Exceptions for resource lifecycle issues such as not found, already exists, and conflict.
Resource-related error types.
archipy.models.errors.resource_errors.NotFoundError ¶
Bases: BaseError
Exception raised when a resource is not found.
Source code in archipy/models/errors/resource_errors.py
archipy.models.errors.resource_errors.NotFoundError.message_en
class-attribute
¶
archipy.models.errors.resource_errors.NotFoundError.message_fa
class-attribute
¶
archipy.models.errors.resource_errors.NotFoundError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.NOT_FOUND.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 404
)
archipy.models.errors.resource_errors.NotFoundError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.NOT_FOUND.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.NOT_FOUND.value, tuple)
else StatusCode.NOT_FOUND.value
if GRPC_AVAILABLE and StatusCode is not None
else 5
)
archipy.models.errors.resource_errors.NotFoundError.lang
instance-attribute
¶
archipy.models.errors.resource_errors.NotFoundError.additional_data
instance-attribute
¶
archipy.models.errors.resource_errors.NotFoundError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.resource_errors.NotFoundError.get_message ¶
Gets the localized error message with resource type.
Source code in archipy/models/errors/resource_errors.py
archipy.models.errors.resource_errors.NotFoundError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.AlreadyExistsError ¶
Bases: BaseError
Exception raised when a resource already exists.
Source code in archipy/models/errors/resource_errors.py
archipy.models.errors.resource_errors.AlreadyExistsError.code
class-attribute
¶
archipy.models.errors.resource_errors.AlreadyExistsError.message_en
class-attribute
¶
archipy.models.errors.resource_errors.AlreadyExistsError.message_fa
class-attribute
¶
archipy.models.errors.resource_errors.AlreadyExistsError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.CONFLICT.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 409
)
archipy.models.errors.resource_errors.AlreadyExistsError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.ALREADY_EXISTS.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.ALREADY_EXISTS.value, tuple)
else StatusCode.ALREADY_EXISTS.value
if GRPC_AVAILABLE and StatusCode is not None
else 6
)
archipy.models.errors.resource_errors.AlreadyExistsError.lang
instance-attribute
¶
archipy.models.errors.resource_errors.AlreadyExistsError.additional_data
instance-attribute
¶
archipy.models.errors.resource_errors.AlreadyExistsError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.resource_errors.AlreadyExistsError.get_message ¶
Gets the localized error message with resource type.
Source code in archipy/models/errors/resource_errors.py
archipy.models.errors.resource_errors.AlreadyExistsError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.ConflictError ¶
Bases: BaseError
Exception raised when there is a resource conflict.
Source code in archipy/models/errors/resource_errors.py
archipy.models.errors.resource_errors.ConflictError.message_en
class-attribute
¶
archipy.models.errors.resource_errors.ConflictError.message_fa
class-attribute
¶
archipy.models.errors.resource_errors.ConflictError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.CONFLICT.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 409
)
archipy.models.errors.resource_errors.ConflictError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.ABORTED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.ABORTED.value, tuple)
else StatusCode.ABORTED.value
if GRPC_AVAILABLE and StatusCode is not None
else 10
)
archipy.models.errors.resource_errors.ConflictError.lang
instance-attribute
¶
archipy.models.errors.resource_errors.ConflictError.additional_data
instance-attribute
¶
archipy.models.errors.resource_errors.ConflictError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.resource_errors.ConflictError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.ConflictError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.ResourceLockedError ¶
Bases: BaseError
Exception raised when a resource is locked.
Source code in archipy/models/errors/resource_errors.py
archipy.models.errors.resource_errors.ResourceLockedError.code
class-attribute
¶
archipy.models.errors.resource_errors.ResourceLockedError.message_en
class-attribute
¶
archipy.models.errors.resource_errors.ResourceLockedError.message_fa
class-attribute
¶
archipy.models.errors.resource_errors.ResourceLockedError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.CONFLICT.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 409
)
archipy.models.errors.resource_errors.ResourceLockedError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.ABORTED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.ABORTED.value, tuple)
else StatusCode.ABORTED.value
if GRPC_AVAILABLE and StatusCode is not None
else 10
)
archipy.models.errors.resource_errors.ResourceLockedError.lang
instance-attribute
¶
archipy.models.errors.resource_errors.ResourceLockedError.additional_data
instance-attribute
¶
archipy.models.errors.resource_errors.ResourceLockedError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.resource_errors.ResourceLockedError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.ResourceLockedError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.ResourceBusyError ¶
Bases: BaseError
Exception raised when a resource is busy.
Source code in archipy/models/errors/resource_errors.py
archipy.models.errors.resource_errors.ResourceBusyError.code
class-attribute
¶
archipy.models.errors.resource_errors.ResourceBusyError.message_en
class-attribute
¶
archipy.models.errors.resource_errors.ResourceBusyError.message_fa
class-attribute
¶
archipy.models.errors.resource_errors.ResourceBusyError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.CONFLICT.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 409
)
archipy.models.errors.resource_errors.ResourceBusyError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.ABORTED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.ABORTED.value, tuple)
else StatusCode.ABORTED.value
if GRPC_AVAILABLE and StatusCode is not None
else 10
)
archipy.models.errors.resource_errors.ResourceBusyError.lang
instance-attribute
¶
archipy.models.errors.resource_errors.ResourceBusyError.additional_data
instance-attribute
¶
archipy.models.errors.resource_errors.ResourceBusyError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.resource_errors.ResourceBusyError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.ResourceBusyError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.DataLossError ¶
Bases: BaseError
Exception raised when data is lost.
Source code in archipy/models/errors/resource_errors.py
archipy.models.errors.resource_errors.DataLossError.message_en
class-attribute
¶
archipy.models.errors.resource_errors.DataLossError.message_fa
class-attribute
¶
archipy.models.errors.resource_errors.DataLossError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.INTERNAL_SERVER_ERROR.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 500
)
archipy.models.errors.resource_errors.DataLossError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.DATA_LOSS.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.DATA_LOSS.value, tuple)
else StatusCode.DATA_LOSS.value
if GRPC_AVAILABLE and StatusCode is not None
else 15
)
archipy.models.errors.resource_errors.DataLossError.lang
instance-attribute
¶
archipy.models.errors.resource_errors.DataLossError.additional_data
instance-attribute
¶
archipy.models.errors.resource_errors.DataLossError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.resource_errors.DataLossError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.DataLossError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.InvalidEntityTypeError ¶
Bases: BaseError
Exception raised for invalid entity types.
Source code in archipy/models/errors/resource_errors.py
archipy.models.errors.resource_errors.InvalidEntityTypeError.code
class-attribute
¶
archipy.models.errors.resource_errors.InvalidEntityTypeError.message_en
class-attribute
¶
archipy.models.errors.resource_errors.InvalidEntityTypeError.message_fa
class-attribute
¶
archipy.models.errors.resource_errors.InvalidEntityTypeError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.resource_errors.InvalidEntityTypeError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE and StatusCode is not None
else 3
)
archipy.models.errors.resource_errors.InvalidEntityTypeError.lang
instance-attribute
¶
archipy.models.errors.resource_errors.InvalidEntityTypeError.additional_data
instance-attribute
¶
archipy.models.errors.resource_errors.InvalidEntityTypeError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.resource_errors.InvalidEntityTypeError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.InvalidEntityTypeError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.FileTooLargeError ¶
Bases: BaseError
Exception raised when a file is too large.
Source code in archipy/models/errors/resource_errors.py
archipy.models.errors.resource_errors.FileTooLargeError.code
class-attribute
¶
archipy.models.errors.resource_errors.FileTooLargeError.message_en
class-attribute
¶
archipy.models.errors.resource_errors.FileTooLargeError.message_fa
class-attribute
¶
archipy.models.errors.resource_errors.FileTooLargeError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.resource_errors.FileTooLargeError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE and StatusCode is not None
else 3
)
archipy.models.errors.resource_errors.FileTooLargeError.lang
instance-attribute
¶
archipy.models.errors.resource_errors.FileTooLargeError.additional_data
instance-attribute
¶
archipy.models.errors.resource_errors.FileTooLargeError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.resource_errors.FileTooLargeError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.FileTooLargeError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.InvalidFileTypeError ¶
Bases: BaseError
Exception raised for invalid file types.
Source code in archipy/models/errors/resource_errors.py
archipy.models.errors.resource_errors.InvalidFileTypeError.code
class-attribute
¶
archipy.models.errors.resource_errors.InvalidFileTypeError.message_en
class-attribute
¶
archipy.models.errors.resource_errors.InvalidFileTypeError.message_fa
class-attribute
¶
archipy.models.errors.resource_errors.InvalidFileTypeError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_REQUEST.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 400
)
archipy.models.errors.resource_errors.InvalidFileTypeError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INVALID_ARGUMENT.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INVALID_ARGUMENT.value, tuple)
else StatusCode.INVALID_ARGUMENT.value
if GRPC_AVAILABLE and StatusCode is not None
else 3
)
archipy.models.errors.resource_errors.InvalidFileTypeError.lang
instance-attribute
¶
archipy.models.errors.resource_errors.InvalidFileTypeError.additional_data
instance-attribute
¶
archipy.models.errors.resource_errors.InvalidFileTypeError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.resource_errors.InvalidFileTypeError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.InvalidFileTypeError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.QuotaExceededError ¶
Bases: BaseError
Exception raised when a quota is exceeded.
Source code in archipy/models/errors/resource_errors.py
archipy.models.errors.resource_errors.QuotaExceededError.code
class-attribute
¶
archipy.models.errors.resource_errors.QuotaExceededError.message_en
class-attribute
¶
archipy.models.errors.resource_errors.QuotaExceededError.message_fa
class-attribute
¶
archipy.models.errors.resource_errors.QuotaExceededError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.FORBIDDEN.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 403
)
archipy.models.errors.resource_errors.QuotaExceededError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.RESOURCE_EXHAUSTED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.RESOURCE_EXHAUSTED.value, tuple
)
else StatusCode.RESOURCE_EXHAUSTED.value
if GRPC_AVAILABLE and StatusCode is not None
else 8
)
archipy.models.errors.resource_errors.QuotaExceededError.lang
instance-attribute
¶
archipy.models.errors.resource_errors.QuotaExceededError.additional_data
instance-attribute
¶
archipy.models.errors.resource_errors.QuotaExceededError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.resource_errors.QuotaExceededError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.QuotaExceededError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.ResourceExhaustedError ¶
Bases: BaseError
Exception raised when a resource is exhausted.
Source code in archipy/models/errors/resource_errors.py
archipy.models.errors.resource_errors.ResourceExhaustedError.code
class-attribute
¶
archipy.models.errors.resource_errors.ResourceExhaustedError.message_en
class-attribute
¶
archipy.models.errors.resource_errors.ResourceExhaustedError.message_fa
class-attribute
¶
archipy.models.errors.resource_errors.ResourceExhaustedError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.TOO_MANY_REQUESTS.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 429
)
archipy.models.errors.resource_errors.ResourceExhaustedError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.RESOURCE_EXHAUSTED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.RESOURCE_EXHAUSTED.value, tuple
)
else StatusCode.RESOURCE_EXHAUSTED.value
if GRPC_AVAILABLE and StatusCode is not None
else 8
)
archipy.models.errors.resource_errors.ResourceExhaustedError.lang
instance-attribute
¶
archipy.models.errors.resource_errors.ResourceExhaustedError.additional_data
instance-attribute
¶
archipy.models.errors.resource_errors.ResourceExhaustedError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.resource_errors.ResourceExhaustedError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.ResourceExhaustedError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.StorageError ¶
Bases: BaseError
Exception raised for storage-related errors.
Source code in archipy/models/errors/resource_errors.py
archipy.models.errors.resource_errors.StorageError.code
class-attribute
¶
archipy.models.errors.resource_errors.StorageError.message_en
class-attribute
¶
archipy.models.errors.resource_errors.StorageError.message_fa
class-attribute
¶
archipy.models.errors.resource_errors.StorageError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.INTERNAL_SERVER_ERROR.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 500
)
archipy.models.errors.resource_errors.StorageError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INTERNAL.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INTERNAL.value, tuple)
else StatusCode.INTERNAL.value
if GRPC_AVAILABLE and StatusCode is not None
else 13
)
archipy.models.errors.resource_errors.StorageError.lang
instance-attribute
¶
archipy.models.errors.resource_errors.StorageError.additional_data
instance-attribute
¶
archipy.models.errors.resource_errors.StorageError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.resource_errors.StorageError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.resource_errors.StorageError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
options: show_root_toc_entry: false heading_level: 3
Business Errors¶
Exceptions representing violations of business rules and domain constraints.
Business-rule error types.
archipy.models.errors.business_errors.InvalidStateError ¶
Bases: BaseError
Exception raised when an operation is attempted in an invalid state.
Source code in archipy/models/errors/business_errors.py
archipy.models.errors.business_errors.InvalidStateError.code
class-attribute
¶
archipy.models.errors.business_errors.InvalidStateError.message_en
class-attribute
¶
archipy.models.errors.business_errors.InvalidStateError.message_fa
class-attribute
¶
archipy.models.errors.business_errors.InvalidStateError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.CONFLICT.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 409
)
archipy.models.errors.business_errors.InvalidStateError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.FAILED_PRECONDITION.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.FAILED_PRECONDITION.value, tuple
)
else StatusCode.FAILED_PRECONDITION.value
if GRPC_AVAILABLE and StatusCode is not None
else 9
)
archipy.models.errors.business_errors.InvalidStateError.lang
instance-attribute
¶
archipy.models.errors.business_errors.InvalidStateError.additional_data
instance-attribute
¶
archipy.models.errors.business_errors.InvalidStateError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.business_errors.InvalidStateError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.business_errors.InvalidStateError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.business_errors.FailedPreconditionError ¶
Bases: BaseError
Exception raised when a precondition for an operation is not met.
Source code in archipy/models/errors/business_errors.py
archipy.models.errors.business_errors.FailedPreconditionError.code
class-attribute
¶
archipy.models.errors.business_errors.FailedPreconditionError.message_en
class-attribute
¶
archipy.models.errors.business_errors.FailedPreconditionError.message_fa
class-attribute
¶
archipy.models.errors.business_errors.FailedPreconditionError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.PRECONDITION_FAILED.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 412
)
archipy.models.errors.business_errors.FailedPreconditionError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.FAILED_PRECONDITION.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.FAILED_PRECONDITION.value, tuple
)
else StatusCode.FAILED_PRECONDITION.value
if GRPC_AVAILABLE and StatusCode is not None
else 9
)
archipy.models.errors.business_errors.FailedPreconditionError.lang
instance-attribute
¶
archipy.models.errors.business_errors.FailedPreconditionError.additional_data
instance-attribute
¶
archipy.models.errors.business_errors.FailedPreconditionError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.business_errors.FailedPreconditionError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.business_errors.FailedPreconditionError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.business_errors.BusinessRuleViolationError ¶
Bases: BaseError
Exception raised when a business rule is violated.
Source code in archipy/models/errors/business_errors.py
archipy.models.errors.business_errors.BusinessRuleViolationError.code
class-attribute
¶
archipy.models.errors.business_errors.BusinessRuleViolationError.message_en
class-attribute
¶
archipy.models.errors.business_errors.BusinessRuleViolationError.message_fa
class-attribute
¶
archipy.models.errors.business_errors.BusinessRuleViolationError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.CONFLICT.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 409
)
archipy.models.errors.business_errors.BusinessRuleViolationError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.FAILED_PRECONDITION.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.FAILED_PRECONDITION.value, tuple
)
else StatusCode.FAILED_PRECONDITION.value
if GRPC_AVAILABLE and StatusCode is not None
else 9
)
archipy.models.errors.business_errors.BusinessRuleViolationError.lang
instance-attribute
¶
archipy.models.errors.business_errors.BusinessRuleViolationError.additional_data
instance-attribute
¶
archipy.models.errors.business_errors.BusinessRuleViolationError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.business_errors.BusinessRuleViolationError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.business_errors.BusinessRuleViolationError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.business_errors.InvalidOperationError ¶
Bases: BaseError
Exception raised when an operation is not allowed in the current context.
Source code in archipy/models/errors/business_errors.py
archipy.models.errors.business_errors.InvalidOperationError.code
class-attribute
¶
archipy.models.errors.business_errors.InvalidOperationError.message_en
class-attribute
¶
archipy.models.errors.business_errors.InvalidOperationError.message_fa
class-attribute
¶
archipy.models.errors.business_errors.InvalidOperationError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.FORBIDDEN.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 403
)
archipy.models.errors.business_errors.InvalidOperationError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.PERMISSION_DENIED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.PERMISSION_DENIED.value, tuple
)
else StatusCode.PERMISSION_DENIED.value
if GRPC_AVAILABLE and StatusCode is not None
else 7
)
archipy.models.errors.business_errors.InvalidOperationError.lang
instance-attribute
¶
archipy.models.errors.business_errors.InvalidOperationError.additional_data
instance-attribute
¶
archipy.models.errors.business_errors.InvalidOperationError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.business_errors.InvalidOperationError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.business_errors.InvalidOperationError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.business_errors.InsufficientFundsError ¶
Bases: BaseError
Exception raised when there are insufficient funds for an operation.
Source code in archipy/models/errors/business_errors.py
archipy.models.errors.business_errors.InsufficientFundsError.code
class-attribute
¶
archipy.models.errors.business_errors.InsufficientFundsError.message_en
class-attribute
¶
archipy.models.errors.business_errors.InsufficientFundsError.message_fa
class-attribute
¶
archipy.models.errors.business_errors.InsufficientFundsError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.PAYMENT_REQUIRED.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 402
)
archipy.models.errors.business_errors.InsufficientFundsError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.FAILED_PRECONDITION.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.FAILED_PRECONDITION.value, tuple
)
else StatusCode.FAILED_PRECONDITION.value
if GRPC_AVAILABLE and StatusCode is not None
else 9
)
archipy.models.errors.business_errors.InsufficientFundsError.lang
instance-attribute
¶
archipy.models.errors.business_errors.InsufficientFundsError.additional_data
instance-attribute
¶
archipy.models.errors.business_errors.InsufficientFundsError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.business_errors.InsufficientFundsError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.business_errors.InsufficientFundsError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.business_errors.InsufficientBalanceError ¶
Bases: BaseError
Exception raised when an operation fails due to insufficient account balance.
Source code in archipy/models/errors/business_errors.py
archipy.models.errors.business_errors.InsufficientBalanceError.code
class-attribute
¶
archipy.models.errors.business_errors.InsufficientBalanceError.message_en
class-attribute
¶
archipy.models.errors.business_errors.InsufficientBalanceError.message_fa
class-attribute
¶
archipy.models.errors.business_errors.InsufficientBalanceError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.PAYMENT_REQUIRED.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 402
)
archipy.models.errors.business_errors.InsufficientBalanceError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.FAILED_PRECONDITION.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.FAILED_PRECONDITION.value, tuple
)
else StatusCode.FAILED_PRECONDITION.value
if GRPC_AVAILABLE and StatusCode is not None
else 9
)
archipy.models.errors.business_errors.InsufficientBalanceError.lang
instance-attribute
¶
archipy.models.errors.business_errors.InsufficientBalanceError.additional_data
instance-attribute
¶
archipy.models.errors.business_errors.InsufficientBalanceError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.business_errors.InsufficientBalanceError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.business_errors.InsufficientBalanceError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.business_errors.MaintenanceModeError ¶
Bases: BaseError
Exception raised when the system is in maintenance mode.
Source code in archipy/models/errors/business_errors.py
archipy.models.errors.business_errors.MaintenanceModeError.code
class-attribute
¶
archipy.models.errors.business_errors.MaintenanceModeError.message_en
class-attribute
¶
archipy.models.errors.business_errors.MaintenanceModeError.message_fa
class-attribute
¶
archipy.models.errors.business_errors.MaintenanceModeError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.SERVICE_UNAVAILABLE.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 503
)
archipy.models.errors.business_errors.MaintenanceModeError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.UNAVAILABLE.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.UNAVAILABLE.value, tuple)
else StatusCode.UNAVAILABLE.value
if GRPC_AVAILABLE and StatusCode is not None
else 14
)
archipy.models.errors.business_errors.MaintenanceModeError.lang
instance-attribute
¶
archipy.models.errors.business_errors.MaintenanceModeError.additional_data
instance-attribute
¶
archipy.models.errors.business_errors.MaintenanceModeError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.business_errors.MaintenanceModeError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.business_errors.MaintenanceModeError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
options: show_root_toc_entry: false heading_level: 3
Network Errors¶
Exceptions for network communication failures including timeouts and connectivity issues.
Network-related error types.
archipy.models.errors.network_errors.NetworkError ¶
Bases: BaseError
Exception raised for network-related errors.
Source code in archipy/models/errors/network_errors.py
archipy.models.errors.network_errors.NetworkError.code
class-attribute
¶
archipy.models.errors.network_errors.NetworkError.message_en
class-attribute
¶
archipy.models.errors.network_errors.NetworkError.message_fa
class-attribute
¶
archipy.models.errors.network_errors.NetworkError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_GATEWAY.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 502
)
archipy.models.errors.network_errors.NetworkError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.UNAVAILABLE.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.UNAVAILABLE.value, tuple)
else StatusCode.UNAVAILABLE.value
if GRPC_AVAILABLE and StatusCode is not None
else 14
)
archipy.models.errors.network_errors.NetworkError.lang
instance-attribute
¶
archipy.models.errors.network_errors.NetworkError.additional_data
instance-attribute
¶
archipy.models.errors.network_errors.NetworkError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.network_errors.NetworkError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.network_errors.NetworkError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.network_errors.ConnectionTimeoutError ¶
Bases: BaseError
Exception raised when a connection times out.
Source code in archipy/models/errors/network_errors.py
archipy.models.errors.network_errors.ConnectionTimeoutError.code
class-attribute
¶
archipy.models.errors.network_errors.ConnectionTimeoutError.message_en
class-attribute
¶
archipy.models.errors.network_errors.ConnectionTimeoutError.message_fa
class-attribute
¶
archipy.models.errors.network_errors.ConnectionTimeoutError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.REQUEST_TIMEOUT.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 408
)
archipy.models.errors.network_errors.ConnectionTimeoutError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.DEADLINE_EXCEEDED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.DEADLINE_EXCEEDED.value, tuple
)
else StatusCode.DEADLINE_EXCEEDED.value
if GRPC_AVAILABLE and StatusCode is not None
else 4
)
archipy.models.errors.network_errors.ConnectionTimeoutError.lang
instance-attribute
¶
archipy.models.errors.network_errors.ConnectionTimeoutError.additional_data
instance-attribute
¶
archipy.models.errors.network_errors.ConnectionTimeoutError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.network_errors.ConnectionTimeoutError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.network_errors.ConnectionTimeoutError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.network_errors.ServiceUnavailableError ¶
Bases: BaseError
Exception raised when a service is unavailable.
Source code in archipy/models/errors/network_errors.py
archipy.models.errors.network_errors.ServiceUnavailableError.code
class-attribute
¶
archipy.models.errors.network_errors.ServiceUnavailableError.message_en
class-attribute
¶
archipy.models.errors.network_errors.ServiceUnavailableError.message_fa
class-attribute
¶
archipy.models.errors.network_errors.ServiceUnavailableError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.SERVICE_UNAVAILABLE.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 503
)
archipy.models.errors.network_errors.ServiceUnavailableError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.UNAVAILABLE.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.UNAVAILABLE.value, tuple)
else StatusCode.UNAVAILABLE.value
if GRPC_AVAILABLE and StatusCode is not None
else 14
)
archipy.models.errors.network_errors.ServiceUnavailableError.lang
instance-attribute
¶
archipy.models.errors.network_errors.ServiceUnavailableError.additional_data
instance-attribute
¶
archipy.models.errors.network_errors.ServiceUnavailableError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.network_errors.ServiceUnavailableError.get_message ¶
archipy.models.errors.network_errors.ServiceUnavailableError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
archipy.models.errors.network_errors.GatewayTimeoutError ¶
Bases: BaseError
Exception raised when a gateway times out.
Source code in archipy/models/errors/network_errors.py
archipy.models.errors.network_errors.GatewayTimeoutError.code
class-attribute
¶
archipy.models.errors.network_errors.GatewayTimeoutError.message_en
class-attribute
¶
archipy.models.errors.network_errors.GatewayTimeoutError.message_fa
class-attribute
¶
archipy.models.errors.network_errors.GatewayTimeoutError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.GATEWAY_TIMEOUT.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 504
)
archipy.models.errors.network_errors.GatewayTimeoutError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.DEADLINE_EXCEEDED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.DEADLINE_EXCEEDED.value, tuple
)
else StatusCode.DEADLINE_EXCEEDED.value
if GRPC_AVAILABLE and StatusCode is not None
else 4
)
archipy.models.errors.network_errors.GatewayTimeoutError.lang
instance-attribute
¶
archipy.models.errors.network_errors.GatewayTimeoutError.additional_data
instance-attribute
¶
archipy.models.errors.network_errors.GatewayTimeoutError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.network_errors.GatewayTimeoutError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.network_errors.GatewayTimeoutError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.network_errors.BadGatewayError ¶
Bases: BaseError
Exception raised when a gateway returns an invalid response.
Source code in archipy/models/errors/network_errors.py
archipy.models.errors.network_errors.BadGatewayError.code
class-attribute
¶
archipy.models.errors.network_errors.BadGatewayError.message_en
class-attribute
¶
archipy.models.errors.network_errors.BadGatewayError.message_fa
class-attribute
¶
archipy.models.errors.network_errors.BadGatewayError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.BAD_GATEWAY.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 502
)
archipy.models.errors.network_errors.BadGatewayError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.UNAVAILABLE.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.UNAVAILABLE.value, tuple)
else StatusCode.UNAVAILABLE.value
if GRPC_AVAILABLE and StatusCode is not None
else 14
)
archipy.models.errors.network_errors.BadGatewayError.lang
instance-attribute
¶
archipy.models.errors.network_errors.BadGatewayError.additional_data
instance-attribute
¶
archipy.models.errors.network_errors.BadGatewayError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.network_errors.BadGatewayError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.network_errors.BadGatewayError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.network_errors.RateLimitExceededError ¶
Bases: BaseError
Exception raised when a rate limit is exceeded.
Source code in archipy/models/errors/network_errors.py
archipy.models.errors.network_errors.RateLimitExceededError.code
class-attribute
¶
archipy.models.errors.network_errors.RateLimitExceededError.message_en
class-attribute
¶
archipy.models.errors.network_errors.RateLimitExceededError.message_fa
class-attribute
¶
archipy.models.errors.network_errors.RateLimitExceededError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.TOO_MANY_REQUESTS.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 429
)
archipy.models.errors.network_errors.RateLimitExceededError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.RESOURCE_EXHAUSTED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.RESOURCE_EXHAUSTED.value, tuple
)
else StatusCode.RESOURCE_EXHAUSTED.value
if GRPC_AVAILABLE and StatusCode is not None
else 8
)
archipy.models.errors.network_errors.RateLimitExceededError.lang
instance-attribute
¶
archipy.models.errors.network_errors.RateLimitExceededError.additional_data
instance-attribute
¶
archipy.models.errors.network_errors.RateLimitExceededError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.network_errors.RateLimitExceededError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.network_errors.RateLimitExceededError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
options: show_root_toc_entry: false heading_level: 3
Database Errors¶
Exceptions for database-level failures including connection errors, constraint violations, and transaction failures.
Database-related error types.
archipy.models.errors.database_errors.DatabaseError ¶
Bases: BaseError
Base class for all database-related errors.
Source code in archipy/models/errors/database_errors.py
archipy.models.errors.database_errors.DatabaseError.code
class-attribute
¶
archipy.models.errors.database_errors.DatabaseError.retryable
class-attribute
¶
archipy.models.errors.database_errors.DatabaseError.message_en
class-attribute
¶
archipy.models.errors.database_errors.DatabaseError.message_fa
class-attribute
¶
archipy.models.errors.database_errors.DatabaseError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.INTERNAL_SERVER_ERROR.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 500
)
archipy.models.errors.database_errors.DatabaseError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INTERNAL.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INTERNAL.value, tuple)
else StatusCode.INTERNAL.value
if GRPC_AVAILABLE and StatusCode is not None
else 13
)
archipy.models.errors.database_errors.DatabaseError.lang
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseError.additional_data
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.database_errors.DatabaseError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseQueryError ¶
Bases: DatabaseError
Exception raised for database query errors.
Source code in archipy/models/errors/database_errors.py
archipy.models.errors.database_errors.DatabaseQueryError.code
class-attribute
¶
archipy.models.errors.database_errors.DatabaseQueryError.message_en
class-attribute
¶
archipy.models.errors.database_errors.DatabaseQueryError.message_fa
class-attribute
¶
archipy.models.errors.database_errors.DatabaseQueryError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.INTERNAL_SERVER_ERROR.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 500
)
archipy.models.errors.database_errors.DatabaseQueryError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INTERNAL.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INTERNAL.value, tuple)
else StatusCode.INTERNAL.value
if GRPC_AVAILABLE and StatusCode is not None
else 13
)
archipy.models.errors.database_errors.DatabaseQueryError.lang
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseQueryError.additional_data
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseQueryError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.database_errors.DatabaseQueryError.retryable
class-attribute
¶
archipy.models.errors.database_errors.DatabaseQueryError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseQueryError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseConnectionError ¶
Bases: DatabaseQueryError
Exception raised for database connection errors.
Source code in archipy/models/errors/database_errors.py
archipy.models.errors.database_errors.DatabaseConnectionError.code
class-attribute
¶
archipy.models.errors.database_errors.DatabaseConnectionError.message_en
class-attribute
¶
archipy.models.errors.database_errors.DatabaseConnectionError.message_fa
class-attribute
¶
archipy.models.errors.database_errors.DatabaseConnectionError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.SERVICE_UNAVAILABLE.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 503
)
archipy.models.errors.database_errors.DatabaseConnectionError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.UNAVAILABLE.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.UNAVAILABLE.value, tuple)
else StatusCode.UNAVAILABLE.value
if GRPC_AVAILABLE and StatusCode is not None
else 14
)
archipy.models.errors.database_errors.DatabaseConnectionError.lang
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseConnectionError.additional_data
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseConnectionError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.database_errors.DatabaseConnectionError.retryable
class-attribute
¶
archipy.models.errors.database_errors.DatabaseConnectionError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseConnectionError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseTransactionError ¶
Bases: DatabaseError
Exception raised for database transaction errors.
Source code in archipy/models/errors/database_errors.py
archipy.models.errors.database_errors.DatabaseTransactionError.code
class-attribute
¶
archipy.models.errors.database_errors.DatabaseTransactionError.message_en
class-attribute
¶
archipy.models.errors.database_errors.DatabaseTransactionError.message_fa
class-attribute
¶
archipy.models.errors.database_errors.DatabaseTransactionError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.INTERNAL_SERVER_ERROR.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 500
)
archipy.models.errors.database_errors.DatabaseTransactionError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INTERNAL.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INTERNAL.value, tuple)
else StatusCode.INTERNAL.value
if GRPC_AVAILABLE and StatusCode is not None
else 13
)
archipy.models.errors.database_errors.DatabaseTransactionError.lang
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseTransactionError.additional_data
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseTransactionError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.database_errors.DatabaseTransactionError.retryable
class-attribute
¶
archipy.models.errors.database_errors.DatabaseTransactionError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseTransactionError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseTimeoutError ¶
Bases: DatabaseQueryError
Exception raised for database timeout errors.
Source code in archipy/models/errors/database_errors.py
archipy.models.errors.database_errors.DatabaseTimeoutError.code
class-attribute
¶
archipy.models.errors.database_errors.DatabaseTimeoutError.message_en
class-attribute
¶
archipy.models.errors.database_errors.DatabaseTimeoutError.message_fa
class-attribute
¶
archipy.models.errors.database_errors.DatabaseTimeoutError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.REQUEST_TIMEOUT.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 408
)
archipy.models.errors.database_errors.DatabaseTimeoutError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.DEADLINE_EXCEEDED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.DEADLINE_EXCEEDED.value, tuple
)
else StatusCode.DEADLINE_EXCEEDED.value
if GRPC_AVAILABLE and StatusCode is not None
else 4
)
archipy.models.errors.database_errors.DatabaseTimeoutError.lang
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseTimeoutError.additional_data
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseTimeoutError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.database_errors.DatabaseTimeoutError.retryable
class-attribute
¶
archipy.models.errors.database_errors.DatabaseTimeoutError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseTimeoutError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseConstraintError ¶
Bases: DatabaseQueryError
Exception raised for database constraint violations.
Source code in archipy/models/errors/database_errors.py
archipy.models.errors.database_errors.DatabaseConstraintError.code
class-attribute
¶
archipy.models.errors.database_errors.DatabaseConstraintError.message_en
class-attribute
¶
archipy.models.errors.database_errors.DatabaseConstraintError.message_fa
class-attribute
¶
archipy.models.errors.database_errors.DatabaseConstraintError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.CONFLICT.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 409
)
archipy.models.errors.database_errors.DatabaseConstraintError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.FAILED_PRECONDITION.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.FAILED_PRECONDITION.value, tuple
)
else StatusCode.FAILED_PRECONDITION.value
if GRPC_AVAILABLE and StatusCode is not None
else 9
)
archipy.models.errors.database_errors.DatabaseConstraintError.lang
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseConstraintError.additional_data
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseConstraintError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.database_errors.DatabaseConstraintError.retryable
class-attribute
¶
archipy.models.errors.database_errors.DatabaseConstraintError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseConstraintError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseIntegrityError ¶
Bases: DatabaseQueryError
Exception raised for database integrity violations.
Source code in archipy/models/errors/database_errors.py
archipy.models.errors.database_errors.DatabaseIntegrityError.code
class-attribute
¶
archipy.models.errors.database_errors.DatabaseIntegrityError.message_en
class-attribute
¶
archipy.models.errors.database_errors.DatabaseIntegrityError.message_fa
class-attribute
¶
archipy.models.errors.database_errors.DatabaseIntegrityError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.CONFLICT.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 409
)
archipy.models.errors.database_errors.DatabaseIntegrityError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.FAILED_PRECONDITION.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.FAILED_PRECONDITION.value, tuple
)
else StatusCode.FAILED_PRECONDITION.value
if GRPC_AVAILABLE and StatusCode is not None
else 9
)
archipy.models.errors.database_errors.DatabaseIntegrityError.lang
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseIntegrityError.additional_data
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseIntegrityError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.database_errors.DatabaseIntegrityError.retryable
class-attribute
¶
archipy.models.errors.database_errors.DatabaseIntegrityError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseIntegrityError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseDeadlockError ¶
Bases: DatabaseQueryError
Exception raised for database deadlock errors.
Source code in archipy/models/errors/database_errors.py
archipy.models.errors.database_errors.DatabaseDeadlockError.code
class-attribute
¶
archipy.models.errors.database_errors.DatabaseDeadlockError.retryable
class-attribute
¶
archipy.models.errors.database_errors.DatabaseDeadlockError.message_en
class-attribute
¶
archipy.models.errors.database_errors.DatabaseDeadlockError.message_fa
class-attribute
¶
archipy.models.errors.database_errors.DatabaseDeadlockError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.CONFLICT.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 409
)
archipy.models.errors.database_errors.DatabaseDeadlockError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.ABORTED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.ABORTED.value, tuple)
else StatusCode.ABORTED.value
if GRPC_AVAILABLE and StatusCode is not None
else 10
)
archipy.models.errors.database_errors.DatabaseDeadlockError.lang
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseDeadlockError.additional_data
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseDeadlockError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.database_errors.DatabaseDeadlockError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseDeadlockError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseSerializationError ¶
Bases: DatabaseQueryError
Exception raised for database serialization errors.
Source code in archipy/models/errors/database_errors.py
archipy.models.errors.database_errors.DatabaseSerializationError.code
class-attribute
¶
archipy.models.errors.database_errors.DatabaseSerializationError.retryable
class-attribute
¶
archipy.models.errors.database_errors.DatabaseSerializationError.message_en
class-attribute
¶
archipy.models.errors.database_errors.DatabaseSerializationError.message_fa
class-attribute
¶
archipy.models.errors.database_errors.DatabaseSerializationError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.CONFLICT.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 409
)
archipy.models.errors.database_errors.DatabaseSerializationError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.ABORTED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.ABORTED.value, tuple)
else StatusCode.ABORTED.value
if GRPC_AVAILABLE and StatusCode is not None
else 10
)
archipy.models.errors.database_errors.DatabaseSerializationError.lang
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseSerializationError.additional_data
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseSerializationError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.database_errors.DatabaseSerializationError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseSerializationError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseResourceExhaustedError ¶
Bases: DatabaseQueryError
Exception raised when the database server runs out of a resource such as memory or connections.
The condition is usually transient, so callers may retry with backoff.
Source code in archipy/models/errors/database_errors.py
archipy.models.errors.database_errors.DatabaseResourceExhaustedError.code
class-attribute
¶
archipy.models.errors.database_errors.DatabaseResourceExhaustedError.retryable
class-attribute
¶
archipy.models.errors.database_errors.DatabaseResourceExhaustedError.message_en
class-attribute
¶
archipy.models.errors.database_errors.DatabaseResourceExhaustedError.message_fa
class-attribute
¶
archipy.models.errors.database_errors.DatabaseResourceExhaustedError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.SERVICE_UNAVAILABLE.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 503
)
archipy.models.errors.database_errors.DatabaseResourceExhaustedError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.RESOURCE_EXHAUSTED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.RESOURCE_EXHAUSTED.value, tuple
)
else StatusCode.RESOURCE_EXHAUSTED.value
if GRPC_AVAILABLE and StatusCode is not None
else 8
)
archipy.models.errors.database_errors.DatabaseResourceExhaustedError.lang
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseResourceExhaustedError.additional_data
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseResourceExhaustedError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.database_errors.DatabaseResourceExhaustedError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseResourceExhaustedError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseUnknownOutcomeError ¶
Bases: DatabaseQueryError
Exception raised when the database cannot tell whether a statement completed.
The outcome is unknown, so the operation must not be retried blindly unless it is idempotent.
Source code in archipy/models/errors/database_errors.py
archipy.models.errors.database_errors.DatabaseUnknownOutcomeError.code
class-attribute
¶
archipy.models.errors.database_errors.DatabaseUnknownOutcomeError.message_en
class-attribute
¶
archipy.models.errors.database_errors.DatabaseUnknownOutcomeError.message_fa
class-attribute
¶
archipy.models.errors.database_errors.DatabaseUnknownOutcomeError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.INTERNAL_SERVER_ERROR.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 500
)
archipy.models.errors.database_errors.DatabaseUnknownOutcomeError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INTERNAL.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INTERNAL.value, tuple)
else StatusCode.INTERNAL.value
if GRPC_AVAILABLE and StatusCode is not None
else 13
)
archipy.models.errors.database_errors.DatabaseUnknownOutcomeError.lang
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseUnknownOutcomeError.additional_data
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseUnknownOutcomeError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.database_errors.DatabaseUnknownOutcomeError.retryable
class-attribute
¶
archipy.models.errors.database_errors.DatabaseUnknownOutcomeError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseUnknownOutcomeError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseConfigurationError ¶
Bases: DatabaseError
Exception raised for database configuration errors.
Source code in archipy/models/errors/database_errors.py
archipy.models.errors.database_errors.DatabaseConfigurationError.code
class-attribute
¶
archipy.models.errors.database_errors.DatabaseConfigurationError.message_en
class-attribute
¶
archipy.models.errors.database_errors.DatabaseConfigurationError.message_fa
class-attribute
¶
archipy.models.errors.database_errors.DatabaseConfigurationError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.INTERNAL_SERVER_ERROR.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 500
)
archipy.models.errors.database_errors.DatabaseConfigurationError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INTERNAL.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INTERNAL.value, tuple)
else StatusCode.INTERNAL.value
if GRPC_AVAILABLE and StatusCode is not None
else 13
)
archipy.models.errors.database_errors.DatabaseConfigurationError.lang
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseConfigurationError.additional_data
instance-attribute
¶
archipy.models.errors.database_errors.DatabaseConfigurationError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.database_errors.DatabaseConfigurationError.retryable
class-attribute
¶
archipy.models.errors.database_errors.DatabaseConfigurationError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.DatabaseConfigurationError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.CacheError ¶
Bases: BaseError
Exception raised for cache access errors.
Source code in archipy/models/errors/database_errors.py
archipy.models.errors.database_errors.CacheError.message_en
class-attribute
¶
archipy.models.errors.database_errors.CacheError.message_fa
class-attribute
¶
archipy.models.errors.database_errors.CacheError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.INTERNAL_SERVER_ERROR.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 500
)
archipy.models.errors.database_errors.CacheError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INTERNAL.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INTERNAL.value, tuple)
else StatusCode.INTERNAL.value
if GRPC_AVAILABLE and StatusCode is not None
else 13
)
archipy.models.errors.database_errors.CacheError.lang
instance-attribute
¶
archipy.models.errors.database_errors.CacheError.additional_data
instance-attribute
¶
archipy.models.errors.database_errors.CacheError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.database_errors.CacheError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.CacheError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.database_errors.CacheMissError ¶
Bases: BaseError
Exception raised when requested data is not found in cache.
Source code in archipy/models/errors/database_errors.py
archipy.models.errors.database_errors.CacheMissError.code
class-attribute
¶
archipy.models.errors.database_errors.CacheMissError.message_en
class-attribute
¶
archipy.models.errors.database_errors.CacheMissError.message_fa
class-attribute
¶
archipy.models.errors.database_errors.CacheMissError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.NOT_FOUND.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 404
)
archipy.models.errors.database_errors.CacheMissError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.NOT_FOUND.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.NOT_FOUND.value, tuple)
else StatusCode.NOT_FOUND.value
if GRPC_AVAILABLE and StatusCode is not None
else 5
)
archipy.models.errors.database_errors.CacheMissError.lang
instance-attribute
¶
archipy.models.errors.database_errors.CacheMissError.additional_data
instance-attribute
¶
archipy.models.errors.database_errors.CacheMissError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.database_errors.CacheMissError.get_message ¶
Gets the localized error message with cache key.
Source code in archipy/models/errors/database_errors.py
archipy.models.errors.database_errors.CacheMissError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
options: show_root_toc_entry: false heading_level: 3
System Errors¶
Exceptions for system-level failures including configuration errors and unexpected runtime conditions.
System-level error types.
archipy.models.errors.system_errors.InternalError ¶
Bases: BaseError
Represents an internal server error.
This error is typically used when an unexpected condition is encountered that prevents the server from fulfilling the request.
Source code in archipy/models/errors/system_errors.py
archipy.models.errors.system_errors.InternalError.code
class-attribute
¶
archipy.models.errors.system_errors.InternalError.message_en
class-attribute
¶
archipy.models.errors.system_errors.InternalError.message_fa
class-attribute
¶
archipy.models.errors.system_errors.InternalError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.INTERNAL_SERVER_ERROR.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 500
)
archipy.models.errors.system_errors.InternalError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INTERNAL.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INTERNAL.value, tuple)
else StatusCode.INTERNAL.value
if GRPC_AVAILABLE and StatusCode is not None
else 13
)
archipy.models.errors.system_errors.InternalError.lang
instance-attribute
¶
archipy.models.errors.system_errors.InternalError.additional_data
instance-attribute
¶
archipy.models.errors.system_errors.InternalError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.system_errors.InternalError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.system_errors.InternalError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.system_errors.ConfigurationError ¶
Bases: BaseError
Represents a configuration error.
This error is used when there is a problem with the application's configuration that prevents it from operating correctly.
Source code in archipy/models/errors/system_errors.py
archipy.models.errors.system_errors.ConfigurationError.code
class-attribute
¶
archipy.models.errors.system_errors.ConfigurationError.message_en
class-attribute
¶
archipy.models.errors.system_errors.ConfigurationError.message_fa
class-attribute
¶
archipy.models.errors.system_errors.ConfigurationError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.INTERNAL_SERVER_ERROR.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 500
)
archipy.models.errors.system_errors.ConfigurationError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INTERNAL.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INTERNAL.value, tuple)
else StatusCode.INTERNAL.value
if GRPC_AVAILABLE and StatusCode is not None
else 13
)
archipy.models.errors.system_errors.ConfigurationError.lang
instance-attribute
¶
archipy.models.errors.system_errors.ConfigurationError.additional_data
instance-attribute
¶
archipy.models.errors.system_errors.ConfigurationError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.system_errors.ConfigurationError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.system_errors.ConfigurationError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.system_errors.UnavailableError ¶
Bases: BaseError
Represents a resource unavailability error.
This error is used when a required resource is temporarily unavailable but may become available again in the future.
Source code in archipy/models/errors/system_errors.py
archipy.models.errors.system_errors.UnavailableError.code
class-attribute
¶
archipy.models.errors.system_errors.UnavailableError.message_en
class-attribute
¶
archipy.models.errors.system_errors.UnavailableError.message_fa
class-attribute
¶
archipy.models.errors.system_errors.UnavailableError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.SERVICE_UNAVAILABLE.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 503
)
archipy.models.errors.system_errors.UnavailableError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.UNAVAILABLE.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.UNAVAILABLE.value, tuple)
else StatusCode.UNAVAILABLE.value
if GRPC_AVAILABLE and StatusCode is not None
else 14
)
archipy.models.errors.system_errors.UnavailableError.lang
instance-attribute
¶
archipy.models.errors.system_errors.UnavailableError.additional_data
instance-attribute
¶
archipy.models.errors.system_errors.UnavailableError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.system_errors.UnavailableError.get_message ¶
archipy.models.errors.system_errors.UnavailableError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
archipy.models.errors.system_errors.UnknownError ¶
Bases: BaseError
Represents an unknown error.
This is a catch-all error type for unexpected conditions that don't fit into other error categories.
Source code in archipy/models/errors/system_errors.py
archipy.models.errors.system_errors.UnknownError.message_en
class-attribute
¶
archipy.models.errors.system_errors.UnknownError.message_fa
class-attribute
¶
archipy.models.errors.system_errors.UnknownError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.INTERNAL_SERVER_ERROR.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 500
)
archipy.models.errors.system_errors.UnknownError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.UNKNOWN.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.UNKNOWN.value, tuple)
else StatusCode.UNKNOWN.value
if GRPC_AVAILABLE and StatusCode is not None
else 2
)
archipy.models.errors.system_errors.UnknownError.lang
instance-attribute
¶
archipy.models.errors.system_errors.UnknownError.additional_data
instance-attribute
¶
archipy.models.errors.system_errors.UnknownError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.system_errors.UnknownError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.system_errors.UnknownError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.system_errors.AbortedError ¶
Bases: BaseError
Represents an aborted operation error.
This error is used when an operation is aborted, typically due to a concurrency issue or user cancellation.
Source code in archipy/models/errors/system_errors.py
archipy.models.errors.system_errors.AbortedError.message_en
class-attribute
¶
archipy.models.errors.system_errors.AbortedError.message_fa
class-attribute
¶
archipy.models.errors.system_errors.AbortedError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.CONFLICT.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 409
)
archipy.models.errors.system_errors.AbortedError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.ABORTED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.ABORTED.value, tuple)
else StatusCode.ABORTED.value
if GRPC_AVAILABLE and StatusCode is not None
else 10
)
archipy.models.errors.system_errors.AbortedError.lang
instance-attribute
¶
archipy.models.errors.system_errors.AbortedError.additional_data
instance-attribute
¶
archipy.models.errors.system_errors.AbortedError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.system_errors.AbortedError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.system_errors.AbortedError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.system_errors.DeadlockDetectedError ¶
Bases: BaseError
Represents a deadlock detection error.
This error is used when a deadlock is detected in a system operation, typically in database transactions or resource locking scenarios.
Source code in archipy/models/errors/system_errors.py
archipy.models.errors.system_errors.DeadlockDetectedError.code
class-attribute
¶
archipy.models.errors.system_errors.DeadlockDetectedError.message_en
class-attribute
¶
archipy.models.errors.system_errors.DeadlockDetectedError.message_fa
class-attribute
¶
archipy.models.errors.system_errors.DeadlockDetectedError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.INTERNAL_SERVER_ERROR.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 500
)
archipy.models.errors.system_errors.DeadlockDetectedError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INTERNAL.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INTERNAL.value, tuple)
else StatusCode.INTERNAL.value
if GRPC_AVAILABLE and StatusCode is not None
else 13
)
archipy.models.errors.system_errors.DeadlockDetectedError.lang
instance-attribute
¶
archipy.models.errors.system_errors.DeadlockDetectedError.additional_data
instance-attribute
¶
archipy.models.errors.system_errors.DeadlockDetectedError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.system_errors.DeadlockDetectedError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.system_errors.DeadlockDetectedError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.system_errors.DeadlineExceededError ¶
Bases: BaseError
Raised when an operation exceeds its deadline/timeout.
This error is typically used in decorators or functions that have time limits or deadlines for completion.
Source code in archipy/models/errors/system_errors.py
archipy.models.errors.system_errors.DeadlineExceededError.code
class-attribute
¶
archipy.models.errors.system_errors.DeadlineExceededError.message_en
class-attribute
¶
archipy.models.errors.system_errors.DeadlineExceededError.message_fa
class-attribute
¶
archipy.models.errors.system_errors.DeadlineExceededError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.REQUEST_TIMEOUT.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 408
)
archipy.models.errors.system_errors.DeadlineExceededError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.DEADLINE_EXCEEDED.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(
StatusCode.DEADLINE_EXCEEDED.value, tuple
)
else StatusCode.DEADLINE_EXCEEDED.value
if GRPC_AVAILABLE and StatusCode is not None
else 4
)
archipy.models.errors.system_errors.DeadlineExceededError.lang
instance-attribute
¶
archipy.models.errors.system_errors.DeadlineExceededError.additional_data
instance-attribute
¶
archipy.models.errors.system_errors.DeadlineExceededError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.system_errors.DeadlineExceededError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.system_errors.DeadlineExceededError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.system_errors.DeprecationError ¶
Bases: BaseError
Raised when deprecated functionality is used.
This error is used to signal that a feature, method, or API is deprecated and should no longer be used.
Source code in archipy/models/errors/system_errors.py
archipy.models.errors.system_errors.DeprecationError.code
class-attribute
¶
archipy.models.errors.system_errors.DeprecationError.message_en
class-attribute
¶
archipy.models.errors.system_errors.DeprecationError.message_fa
class-attribute
¶
archipy.models.errors.system_errors.DeprecationError.http_status
class-attribute
¶
archipy.models.errors.system_errors.DeprecationError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.UNAVAILABLE.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.UNAVAILABLE.value, tuple)
else StatusCode.UNAVAILABLE.value
if GRPC_AVAILABLE and StatusCode is not None
else 14
)
archipy.models.errors.system_errors.DeprecationError.lang
instance-attribute
¶
archipy.models.errors.system_errors.DeprecationError.additional_data
instance-attribute
¶
archipy.models.errors.system_errors.DeprecationError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.system_errors.DeprecationError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.system_errors.DeprecationError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
options: show_root_toc_entry: false heading_level: 3
Keycloak Errors¶
Exceptions specific to Keycloak integration failures, such as token validation errors and realm configuration issues.
Keycloak-related error types.
archipy.models.errors.keycloak_errors.RealmAlreadyExistsError ¶
Bases: BaseError
Exception raised when trying to create a realm that already exists.
Source code in archipy/models/errors/keycloak_errors.py
archipy.models.errors.keycloak_errors.RealmAlreadyExistsError.code
class-attribute
¶
archipy.models.errors.keycloak_errors.RealmAlreadyExistsError.message_en
class-attribute
¶
archipy.models.errors.keycloak_errors.RealmAlreadyExistsError.message_fa
class-attribute
¶
archipy.models.errors.keycloak_errors.RealmAlreadyExistsError.http_status
class-attribute
¶
archipy.models.errors.keycloak_errors.RealmAlreadyExistsError.grpc_status
class-attribute
¶
archipy.models.errors.keycloak_errors.RealmAlreadyExistsError.lang
instance-attribute
¶
archipy.models.errors.keycloak_errors.RealmAlreadyExistsError.additional_data
instance-attribute
¶
archipy.models.errors.keycloak_errors.RealmAlreadyExistsError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.keycloak_errors.RealmAlreadyExistsError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.RealmAlreadyExistsError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.UserAlreadyExistsError ¶
Bases: BaseError
Exception raised when trying to create a user that already exists.
Source code in archipy/models/errors/keycloak_errors.py
archipy.models.errors.keycloak_errors.UserAlreadyExistsError.code
class-attribute
¶
archipy.models.errors.keycloak_errors.UserAlreadyExistsError.message_en
class-attribute
¶
archipy.models.errors.keycloak_errors.UserAlreadyExistsError.message_fa
class-attribute
¶
archipy.models.errors.keycloak_errors.UserAlreadyExistsError.http_status
class-attribute
¶
archipy.models.errors.keycloak_errors.UserAlreadyExistsError.grpc_status
class-attribute
¶
archipy.models.errors.keycloak_errors.UserAlreadyExistsError.lang
instance-attribute
¶
archipy.models.errors.keycloak_errors.UserAlreadyExistsError.additional_data
instance-attribute
¶
archipy.models.errors.keycloak_errors.UserAlreadyExistsError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.keycloak_errors.UserAlreadyExistsError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.UserAlreadyExistsError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.ClientAlreadyExistsError ¶
Bases: BaseError
Exception raised when trying to create a client that already exists.
Source code in archipy/models/errors/keycloak_errors.py
archipy.models.errors.keycloak_errors.ClientAlreadyExistsError.code
class-attribute
¶
archipy.models.errors.keycloak_errors.ClientAlreadyExistsError.message_en
class-attribute
¶
archipy.models.errors.keycloak_errors.ClientAlreadyExistsError.message_fa
class-attribute
¶
archipy.models.errors.keycloak_errors.ClientAlreadyExistsError.http_status
class-attribute
¶
archipy.models.errors.keycloak_errors.ClientAlreadyExistsError.grpc_status
class-attribute
¶
archipy.models.errors.keycloak_errors.ClientAlreadyExistsError.lang
instance-attribute
¶
archipy.models.errors.keycloak_errors.ClientAlreadyExistsError.additional_data
instance-attribute
¶
archipy.models.errors.keycloak_errors.ClientAlreadyExistsError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.keycloak_errors.ClientAlreadyExistsError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.ClientAlreadyExistsError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.RoleAlreadyExistsError ¶
Bases: BaseError
Exception raised when trying to create a role that already exists.
Source code in archipy/models/errors/keycloak_errors.py
archipy.models.errors.keycloak_errors.RoleAlreadyExistsError.code
class-attribute
¶
archipy.models.errors.keycloak_errors.RoleAlreadyExistsError.message_en
class-attribute
¶
archipy.models.errors.keycloak_errors.RoleAlreadyExistsError.message_fa
class-attribute
¶
archipy.models.errors.keycloak_errors.RoleAlreadyExistsError.http_status
class-attribute
¶
archipy.models.errors.keycloak_errors.RoleAlreadyExistsError.grpc_status
class-attribute
¶
archipy.models.errors.keycloak_errors.RoleAlreadyExistsError.lang
instance-attribute
¶
archipy.models.errors.keycloak_errors.RoleAlreadyExistsError.additional_data
instance-attribute
¶
archipy.models.errors.keycloak_errors.RoleAlreadyExistsError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.keycloak_errors.RoleAlreadyExistsError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.RoleAlreadyExistsError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.InvalidCredentialsError ¶
Bases: BaseError
Exception raised for invalid authentication credentials.
Source code in archipy/models/errors/keycloak_errors.py
archipy.models.errors.keycloak_errors.InvalidCredentialsError.code
class-attribute
¶
archipy.models.errors.keycloak_errors.InvalidCredentialsError.message_en
class-attribute
¶
archipy.models.errors.keycloak_errors.InvalidCredentialsError.message_fa
class-attribute
¶
archipy.models.errors.keycloak_errors.InvalidCredentialsError.http_status
class-attribute
¶
archipy.models.errors.keycloak_errors.InvalidCredentialsError.grpc_status
class-attribute
¶
archipy.models.errors.keycloak_errors.InvalidCredentialsError.lang
instance-attribute
¶
archipy.models.errors.keycloak_errors.InvalidCredentialsError.additional_data
instance-attribute
¶
archipy.models.errors.keycloak_errors.InvalidCredentialsError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.keycloak_errors.InvalidCredentialsError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.InvalidCredentialsError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.ResourceNotFoundError ¶
Bases: BaseError
Exception raised when a resource is not found.
Source code in archipy/models/errors/keycloak_errors.py
archipy.models.errors.keycloak_errors.ResourceNotFoundError.code
class-attribute
¶
archipy.models.errors.keycloak_errors.ResourceNotFoundError.message_en
class-attribute
¶
archipy.models.errors.keycloak_errors.ResourceNotFoundError.message_fa
class-attribute
¶
archipy.models.errors.keycloak_errors.ResourceNotFoundError.http_status
class-attribute
¶
archipy.models.errors.keycloak_errors.ResourceNotFoundError.grpc_status
class-attribute
¶
archipy.models.errors.keycloak_errors.ResourceNotFoundError.lang
instance-attribute
¶
archipy.models.errors.keycloak_errors.ResourceNotFoundError.additional_data
instance-attribute
¶
archipy.models.errors.keycloak_errors.ResourceNotFoundError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.keycloak_errors.ResourceNotFoundError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.ResourceNotFoundError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.InsufficientPermissionsError ¶
Bases: BaseError
Exception raised when user lacks required permissions.
Source code in archipy/models/errors/keycloak_errors.py
archipy.models.errors.keycloak_errors.InsufficientPermissionsError.code
class-attribute
¶
archipy.models.errors.keycloak_errors.InsufficientPermissionsError.message_en
class-attribute
¶
archipy.models.errors.keycloak_errors.InsufficientPermissionsError.message_fa
class-attribute
¶
archipy.models.errors.keycloak_errors.InsufficientPermissionsError.http_status
class-attribute
¶
archipy.models.errors.keycloak_errors.InsufficientPermissionsError.grpc_status
class-attribute
¶
archipy.models.errors.keycloak_errors.InsufficientPermissionsError.lang
instance-attribute
¶
archipy.models.errors.keycloak_errors.InsufficientPermissionsError.additional_data
instance-attribute
¶
archipy.models.errors.keycloak_errors.InsufficientPermissionsError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.keycloak_errors.InsufficientPermissionsError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.InsufficientPermissionsError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.ValidationError ¶
Bases: BaseError
Exception raised for validation errors.
Source code in archipy/models/errors/keycloak_errors.py
archipy.models.errors.keycloak_errors.ValidationError.code
class-attribute
¶
archipy.models.errors.keycloak_errors.ValidationError.message_en
class-attribute
¶
archipy.models.errors.keycloak_errors.ValidationError.message_fa
class-attribute
¶
archipy.models.errors.keycloak_errors.ValidationError.http_status
class-attribute
¶
archipy.models.errors.keycloak_errors.ValidationError.grpc_status
class-attribute
¶
archipy.models.errors.keycloak_errors.ValidationError.lang
instance-attribute
¶
archipy.models.errors.keycloak_errors.ValidationError.additional_data
instance-attribute
¶
archipy.models.errors.keycloak_errors.ValidationError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.keycloak_errors.ValidationError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.ValidationError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.PasswordPolicyError ¶
Bases: BaseError
Exception raised when password doesn't meet policy requirements.
Source code in archipy/models/errors/keycloak_errors.py
archipy.models.errors.keycloak_errors.PasswordPolicyError.code
class-attribute
¶
archipy.models.errors.keycloak_errors.PasswordPolicyError.message_en
class-attribute
¶
archipy.models.errors.keycloak_errors.PasswordPolicyError.message_fa
class-attribute
¶
archipy.models.errors.keycloak_errors.PasswordPolicyError.http_status
class-attribute
¶
archipy.models.errors.keycloak_errors.PasswordPolicyError.grpc_status
class-attribute
¶
archipy.models.errors.keycloak_errors.PasswordPolicyError.lang
instance-attribute
¶
archipy.models.errors.keycloak_errors.PasswordPolicyError.additional_data
instance-attribute
¶
archipy.models.errors.keycloak_errors.PasswordPolicyError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.keycloak_errors.PasswordPolicyError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.PasswordPolicyError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.KeycloakConnectionTimeoutError ¶
Bases: BaseError
Exception raised when Keycloak connection times out.
Source code in archipy/models/errors/keycloak_errors.py
archipy.models.errors.keycloak_errors.KeycloakConnectionTimeoutError.code
class-attribute
¶
archipy.models.errors.keycloak_errors.KeycloakConnectionTimeoutError.message_en
class-attribute
¶
archipy.models.errors.keycloak_errors.KeycloakConnectionTimeoutError.message_fa
class-attribute
¶
archipy.models.errors.keycloak_errors.KeycloakConnectionTimeoutError.http_status
class-attribute
¶
archipy.models.errors.keycloak_errors.KeycloakConnectionTimeoutError.grpc_status
class-attribute
¶
archipy.models.errors.keycloak_errors.KeycloakConnectionTimeoutError.lang
instance-attribute
¶
archipy.models.errors.keycloak_errors.KeycloakConnectionTimeoutError.additional_data
instance-attribute
¶
archipy.models.errors.keycloak_errors.KeycloakConnectionTimeoutError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.keycloak_errors.KeycloakConnectionTimeoutError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.KeycloakConnectionTimeoutError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.keycloak_errors.KeycloakServiceUnavailableError ¶
Bases: BaseError
Exception raised when Keycloak service is unavailable.
archipy.models.errors.keycloak_errors.KeycloakServiceUnavailableError.code
class-attribute
¶
archipy.models.errors.keycloak_errors.KeycloakServiceUnavailableError.message_en
class-attribute
¶
archipy.models.errors.keycloak_errors.KeycloakServiceUnavailableError.message_fa
class-attribute
¶
archipy.models.errors.keycloak_errors.KeycloakServiceUnavailableError.http_status
class-attribute
¶
archipy.models.errors.keycloak_errors.KeycloakServiceUnavailableError.grpc_status
class-attribute
¶
archipy.models.errors.keycloak_errors.KeycloakServiceUnavailableError.lang
instance-attribute
¶
archipy.models.errors.keycloak_errors.KeycloakServiceUnavailableError.additional_data
instance-attribute
¶
archipy.models.errors.keycloak_errors.KeycloakServiceUnavailableError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.keycloak_errors.KeycloakServiceUnavailableError.get_message ¶
archipy.models.errors.keycloak_errors.KeycloakServiceUnavailableError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
archipy.models.errors.keycloak_errors.get_error_message ¶
Extract the actual error message from Keycloak error.
Source code in archipy/models/errors/keycloak_errors.py
archipy.models.errors.keycloak_errors.handle_keycloak_error ¶
Convert Keycloak error to appropriate custom error.
Source code in archipy/models/errors/keycloak_errors.py
options: show_root_toc_entry: false heading_level: 3
Temporal Errors¶
Exceptions specific to Temporal workflow orchestration failures, such as workflow execution errors and activity timeouts.
Temporal-specific error definitions.
This module defines custom exception classes for Temporal worker operations, extending the base ArchiPy error handling patterns.
archipy.models.errors.temporal_errors.TemporalError ¶
Bases: BaseError
Base exception for all Temporal-related errors.
This is the root exception class for all Temporal workflow engine errors within the ArchiPy system.
Source code in archipy/models/errors/temporal_errors.py
archipy.models.errors.temporal_errors.TemporalError.code
class-attribute
¶
archipy.models.errors.temporal_errors.TemporalError.message_en
class-attribute
¶
archipy.models.errors.temporal_errors.TemporalError.message_fa
class-attribute
¶
archipy.models.errors.temporal_errors.TemporalError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.INTERNAL_SERVER_ERROR.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 500
)
archipy.models.errors.temporal_errors.TemporalError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INTERNAL.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INTERNAL.value, tuple)
else StatusCode.INTERNAL.value
if GRPC_AVAILABLE and StatusCode is not None
else 13
)
archipy.models.errors.temporal_errors.TemporalError.lang
instance-attribute
¶
archipy.models.errors.temporal_errors.TemporalError.additional_data
instance-attribute
¶
archipy.models.errors.temporal_errors.TemporalError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.temporal_errors.TemporalError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.temporal_errors.TemporalError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.temporal_errors.WorkerConnectionError ¶
Bases: TemporalError
Exception raised when a worker fails to connect to Temporal server.
Source code in archipy/models/errors/temporal_errors.py
archipy.models.errors.temporal_errors.WorkerConnectionError.code
class-attribute
¶
archipy.models.errors.temporal_errors.WorkerConnectionError.message_en
class-attribute
¶
archipy.models.errors.temporal_errors.WorkerConnectionError.message_fa
class-attribute
¶
archipy.models.errors.temporal_errors.WorkerConnectionError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.SERVICE_UNAVAILABLE.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 503
)
archipy.models.errors.temporal_errors.WorkerConnectionError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.UNAVAILABLE.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.UNAVAILABLE.value, tuple)
else StatusCode.UNAVAILABLE.value
if GRPC_AVAILABLE and StatusCode is not None
else 14
)
archipy.models.errors.temporal_errors.WorkerConnectionError.lang
instance-attribute
¶
archipy.models.errors.temporal_errors.WorkerConnectionError.additional_data
instance-attribute
¶
archipy.models.errors.temporal_errors.WorkerConnectionError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.temporal_errors.WorkerConnectionError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.temporal_errors.WorkerConnectionError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.temporal_errors.WorkerShutdownError ¶
Bases: TemporalError
Exception raised when a worker fails to shutdown gracefully.
Source code in archipy/models/errors/temporal_errors.py
archipy.models.errors.temporal_errors.WorkerShutdownError.code
class-attribute
¶
archipy.models.errors.temporal_errors.WorkerShutdownError.message_en
class-attribute
¶
archipy.models.errors.temporal_errors.WorkerShutdownError.message_fa
class-attribute
¶
archipy.models.errors.temporal_errors.WorkerShutdownError.http_status
class-attribute
¶
http_status: int = (
HTTPStatus.INTERNAL_SERVER_ERROR.value
if HTTP_AVAILABLE and HTTPStatus is not None
else 500
)
archipy.models.errors.temporal_errors.WorkerShutdownError.grpc_status
class-attribute
¶
grpc_status: int = (
StatusCode.INTERNAL.value[0]
if GRPC_AVAILABLE
and StatusCode is not None
and isinstance(StatusCode.INTERNAL.value, tuple)
else StatusCode.INTERNAL.value
if GRPC_AVAILABLE and StatusCode is not None
else 13
)
archipy.models.errors.temporal_errors.WorkerShutdownError.lang
instance-attribute
¶
archipy.models.errors.temporal_errors.WorkerShutdownError.additional_data
instance-attribute
¶
archipy.models.errors.temporal_errors.WorkerShutdownError.message
property
¶
Gets the current language message.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
archipy.models.errors.temporal_errors.WorkerShutdownError.get_message ¶
Gets the localized error message based on the language setting.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The error message in the current language. |
Source code in archipy/models/errors/base_error.py
archipy.models.errors.temporal_errors.WorkerShutdownError.to_dict ¶
Converts the exception to a dictionary format for API responses.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
A dictionary containing error details and additional data. |
Source code in archipy/models/errors/base_error.py
options: show_root_toc_entry: false heading_level: 3