Przejdź do głównej zawartości

Errors

Ta treść nie jest jeszcze dostępna w Twoim języku.

Generated from ksef2.core.exceptions.

ClassCodeSummaryConstructorSource
KSeFExceptionSDK_ERRORBase exception for all KSeF SDK errors.KSeFException( message: str, ) -> Nonesrc/ksef2/core/exceptions.py:26
KSeFClientClosedErrorCLIENT_CLOSEDRaised when an SDK client is used after it has been closed.KSeFClientClosedError(message: str, **context: Any) -> KSeFClientClosedErrorsrc/ksef2/core/exceptions.py:37
KSeFUnsupportedEnvironmentErrorUNSUPPORTED_ENVIRONMENTRaised when an operation is not available in the selected environment.KSeFUnsupportedEnvironmentError(message: str, **context: Any) -> KSeFUnsupportedEnvironmentErrorsrc/ksef2/core/exceptions.py:43
KSeFValidationErrorVALIDATION_ERRORRaised when validation fails.KSeFValidationError( message: str, ) -> Nonesrc/ksef2/core/exceptions.py:49
KSeFInvoiceRenderingErrorINVOICE_RENDERING_ERRORRaised when invoice rendering fails.KSeFInvoiceRenderingError(message: str, **context: Any) -> KSeFInvoiceRenderingErrorsrc/ksef2/core/exceptions.py:59
KSeFApiErrorAPI_ERRORRaised on 4xx/5xx responses from the KSeF API.KSeFApiError( status_code: int, exception_code: ExceptionCode, message: str, response: BaseModel | None = None, ) -> Nonesrc/ksef2/core/exceptions.py:65
KSeFAuthErrorAUTH_ERRORRaised on 401/403 responses.KSeFAuthError( status_code: int, message: str, response: BaseModel | None = None, ) -> Nonesrc/ksef2/core/exceptions.py:89
KSeFRateLimitErrorRATE_LIMIT_ERRORRaised on 429 responses. Check retry_after for seconds to wait.KSeFRateLimitError( retry_after: int | None, message: str, response: BaseModel | None = None, ) -> Nonesrc/ksef2/core/exceptions.py:103
KSeFEncryptionErrorENCRYPTION_ERRORRaised when encryption or decryption operations fail.KSeFEncryptionError( message: str, ) -> Nonesrc/ksef2/core/exceptions.py:119
KSeFSessionErrorSESSION_ERRORRaised on session-state violations (e.g. sending invoice on closed session).KSeFSessionError( message: str, ) -> Nonesrc/ksef2/core/exceptions.py:131
NoCertificateAvailableErrorNO_CERTIFICATE_AVAILABLERaised when no certificate is available for signing.NoCertificateAvailableError( message: str, ) -> Nonesrc/ksef2/core/exceptions.py:143
KSeFExportTimeoutErrorEXPORT_TIMEOUTRaised when polling for an export package exceeds the timeout.KSeFExportTimeoutError( reference_number: str, timeout: float, ) -> Nonesrc/ksef2/core/exceptions.py:155
KSeFAuthPollingTimeoutErrorAUTH_POLLING_TIMEOUTRaised when polling for authentication completion exceeds the timeout.KSeFAuthPollingTimeoutError( reference_number: str, timeout: float, ) -> Nonesrc/ksef2/core/exceptions.py:174
KSeFTokenStatusTimeoutErrorTOKEN_STATUS_TIMEOUTRaised when polling for a token status change exceeds the timeout.KSeFTokenStatusTimeoutError( reference_number: str, timeout: float, ) -> Nonesrc/ksef2/core/exceptions.py:193
KSeFInvoiceQueryTimeoutErrorINVOICE_QUERY_TIMEOUTRaised when polling for invoices to appear exceeds the timeout.KSeFInvoiceQueryTimeoutError( timeout: float, ) -> Nonesrc/ksef2/core/exceptions.py:212
KSeFMetadataPaginationErrorMETADATA_PAGINATION_ERRORRaised when metadata pagination cannot continue safely.KSeFMetadataPaginationError(message: str, **context: Any) -> KSeFMetadataPaginationErrorsrc/ksef2/core/exceptions.py:225
KSeFInvoiceDownloadTimeoutErrorINVOICE_DOWNLOAD_TIMEOUTRaised when polling for an invoice download exceeds the timeout.KSeFInvoiceDownloadTimeoutError( ksef_number: str, timeout: float, ) -> Nonesrc/ksef2/core/exceptions.py:231
KSeFInvoiceProcessingTimeoutErrorINVOICE_PROCESSING_TIMEOUTRaised when polling for a session invoice to finish processing exceeds the timeout.KSeFInvoiceProcessingTimeoutError( invoice_reference_number: str, timeout: float, ) -> Nonesrc/ksef2/core/exceptions.py:246
KSeFBatchSessionTimeoutErrorBATCH_SESSION_TIMEOUTRaised when polling for a batch session to finish processing exceeds the timeout.KSeFBatchSessionTimeoutError( reference_number: str, timeout: float, ) -> Nonesrc/ksef2/core/exceptions.py:261
NameValue
UNKNOWN_ERROR10000
OBJECT_ALREADY_EXISTS30001
VALIDATION_ERROR21405
UPO_NOT_FOUND21178
NOT_PROCESSED_YET21165