Skip to main content

keble-exceptions

This package provides a set of predefined exceptions for various error scenarios within the Keble codebase. These exceptions inherit from the base KebleException class.

Base KebleException Signature

def __init__(
    self,
    *,
    alert_admin: bool = False,
    function_identifier: Optional[str] = None,
    admin_note: Optional[str] = None,
    status_code: int = 400,
    how_to_resolve: Optional[HowToResolve] = None,
    fingerprint: Optional[List[str]] = None,
):
    ...

Predefined Exceptions Signatures

Authentication and Authorization Exceptions

  • TokenExpired
    def __init__(self, *args, **kwargs):
        ...
    
  • TokenPurposeUnmatched
    def __init__(self, *args, **kwargs):
        ...
    
  • InactiveUser
    def __init__(self, *args, **kwargs):
        ...
    
  • UserNotFound
    def __init__(self, *args, **kwargs):
        ...
    
  • UserIdentityVerificationIsRequired
    def __init__(self, *args, **kwargs):
        ...
    
  • UserOrOrgIdentityNoSufficientToken
    def __init__(self, *args, **kwargs):
        ...
    
  • NoObjectPermission
    def __init__(self, *, object_id: str, object_type: Optional[str] = None, *args, **kwargs):
        ...
    
  • NoRolePermission
    def __init__(self, *, current_role: str, require_role: str, *args, **kwargs):
        ...
    

Email and Registration Exceptions

  • EmailNotRegistered
    def __init__(self, *args, **kwargs):
        ...
    
  • EmailRegistered
    def __init__(self, *args, **kwargs):
        ...
    
  • InvalidEmailConfirmationCode
    def __init__(self, *args, **kwargs):
        ...
    
  • InvalidEmailOrPassword
    def __init__(self, *args, **kwargs):
        ...
    

Parameter Validation Exceptions

  • ServerSideMissingParams
    def __init__(self, *, missing_params: str, alert_admin: bool, admin_note: Optional[Any] = None, *args, **kwargs):
        ...
    
  • ClientSideMissingParams
    def __init__(self, *, missing_params: str, alert_admin: bool, admin_note: Optional[Any] = None, *args, **kwargs):
        ...
    
  • ServerSideInvalidParams
    def __init__(self, *, invalid_params: str | int, expected: str | int | Type, but_got: str | int | Type, alert_admin: bool, admin_note: Optional[Any] = None, *args, **kwargs):
        ...
    
  • ClientSideInvalidParams
    def __init__(self, *, invalid_params: str | int, expected: str | int | Type, but_got: str | int | Type, alert_admin: bool, admin_note: Optional[Any] = None, *args, **kwargs):
        ...
    

Data and Object Exceptions

  • ObjectNotFound
    def __init__(self, *, object_name: str, id: Any, alert_admin: bool, admin_note: Optional[Any] = None, *args, **kwargs):
        ...
    
  • DataIntegrityCompromised
    def __init__(self, *, object_name: Optional[str] = None, id: Any = None, alert_admin: bool, admin_note: Optional[Any] = None, *args, **kwargs):
        ...
    

Processing and Iteration Exceptions

  • MaxIterationReached
    def __init__(self, *, alert_admin: bool, admin_note: Optional[Any] = None, *args, **kwargs):
        ...
    
  • UnhandledScenarioOrCase
    def __init__(self, *, unhandled_case: str, alert_admin: bool, admin_note: Optional[Any] = None, *args, **kwargs):
        ...
    

Request and Response Exceptions

  • RequestFailure
    def __init__(self, *, admin_note: Any, function_identifier: str, alert_admin: bool, *args, **kwargs):
        ...
    
  • LlmInvalidResponse
    def __init__(self, *, alert_admin: bool, admin_note: Optional[Any] = None, function_identifier: Optional[str] = None, *args, **kwargs):
        ...
    

Rate Limiting Exceptions

  • EmailSendingLimitReached
    def __init__(self, *, wait_minutes: str | float | int, alert_admin: bool, function_identifier: Optional[str] = None, *args, **kwargs):
        ...
    
  • SmsSendingLimitReached
    def __init__(self, *, wait_minutes: str | float | int, alert_admin: bool, function_identifier: Optional[str] = None, *args, **kwargs):
        ...
    
  • FrequencyLimitReached
    def __init__(self, *, wait_minutes: str | float | int, alert_admin: bool, function_identifier: Optional[str] = None, *args, **kwargs):
        ...
    
  • WechatBindingLimitExceeded
    def __init__(self, *, limit: int = 3, alert_admin: bool, admin_note: Any | None = None, *args, **kwargs):
        ...
    

raise_if_not Function

def raise_if_not(condition: bool | List[bool], exception: KebleException):
    # raise when condition is not TRUE or not all TRUE
    ...

Metadata

Release files for keble-exceptions 0.0.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for keble-exceptions 0.0.15
File Size Uploaded Provenance Actions
keble_exceptions-0.0.15.tar.gz 7.7 kB Without provenance Details for keble_exceptions-0.0.15.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for keble-exceptions 0.0.15
File Interpreter ABI Platform Actions
keble_exceptions-0.0.15-py3-none-any.whl Python 3 none any Details for keble_exceptions-0.0.15-py3-none-any.whl

Total release size: 19.0 kB

Release files / keble_exceptions-0.0.15.tar.gz

Download URL keble_exceptions-0.0.15.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0f57b834d5bf8fd1c67ef9c980cca9741b26e9e9bc7f3cb630a4a71d50afb577
BLAKE2b-256 checksum
How to use checksums
d2db4d064969d4424a351318a5059962c97038656008ae9185ed1aa3257df7cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.2 Darwin/25.1.0

Release files / keble_exceptions-0.0.15-py3-none-any.whl

Download URL keble_exceptions-0.0.15-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20f8a604446ef3a24d539e60d70dbfb86356b3cd889351506db3a6552e4d02c8
BLAKE2b-256 checksum
How to use checksums
01b2187a7e78e6b17a57c6db9cbfa86f52228f3a60b37e0b5a8a754cda2f3e22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.2 Darwin/25.1.0

Security for keble-exceptions 0.0.15

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page