app.core.exceptions moduleΒΆ
All custom application exceptions with structured error codes. Every exception maps to a specific HTTP status code and error payload.
- exception app.core.exceptions.CSVEncodingError(message: str, detail: dict[str, Any] | None = None)[source]ΒΆ
Bases:
FinParseException- error_code: str = 'CSV_ENCODING_ERROR'ΒΆ
- status_code: int = 422ΒΆ
- exception app.core.exceptions.CSVMissingRequiredColumnsError(missing: list[str], available: list[str])[source]ΒΆ
Bases:
FinParseException- error_code: str = 'CSV_MISSING_REQUIRED_COLUMNS'ΒΆ
- status_code: int = 422ΒΆ
- exception app.core.exceptions.CSVNoDataRowsError(message: str, detail: dict[str, Any] | None = None)[source]ΒΆ
Bases:
FinParseException- error_code: str = 'CSV_NO_DATA_ROWS'ΒΆ
- status_code: int = 422ΒΆ
- exception app.core.exceptions.CSVParseError(message: str, detail: dict[str, Any] | None = None)[source]ΒΆ
Bases:
FinParseException- error_code: str = 'CSV_PARSE_ERROR'ΒΆ
- status_code: int = 422ΒΆ
- exception app.core.exceptions.DuplicateFileError(existing_document_id: str)[source]ΒΆ
Bases:
FinParseExceptionRaised when a file with the same SHA-256 checksum already exists.
- error_code: str = 'DUPLICATE_FILE'ΒΆ
- status_code: int = 409ΒΆ
- exception app.core.exceptions.EmptyFileError(message: str, detail: dict[str, Any] | None = None)[source]ΒΆ
Bases:
FinParseException- error_code: str = 'EMPTY_FILE'ΒΆ
- status_code: int = 400ΒΆ
- exception app.core.exceptions.FileMimeTypeMismatchError(message: str, detail: dict[str, Any] | None = None)[source]ΒΆ
Bases:
FinParseException- error_code: str = 'FILE_TYPE_MISMATCH'ΒΆ
- status_code: int = 415ΒΆ
- exception app.core.exceptions.FileTooLargeError(message: str, detail: dict[str, Any] | None = None)[source]ΒΆ
Bases:
FinParseException- error_code: str = 'FILE_TOO_LARGE'ΒΆ
- status_code: int = 413ΒΆ
- exception app.core.exceptions.FinParseException(message: str, detail: dict[str, Any] | None = None)[source]ΒΆ
Bases:
ExceptionBase exception for all application errors.
- error_code: str = 'INTERNAL_ERROR'ΒΆ
- status_code: int = 500ΒΆ
- exception app.core.exceptions.InvalidExtensionError(message: str, detail: dict[str, Any] | None = None)[source]ΒΆ
Bases:
FinParseException- error_code: str = 'INVALID_EXTENSION'ΒΆ
- status_code: int = 400ΒΆ
- exception app.core.exceptions.OCRFailedError(message: str, detail: dict[str, Any] | None = None)[source]ΒΆ
Bases:
FinParseException- error_code: str = 'OCR_FAILED'ΒΆ
- status_code: int = 422ΒΆ
- exception app.core.exceptions.PDFCorruptedError(message: str, detail: dict[str, Any] | None = None)[source]ΒΆ
Bases:
FinParseException- error_code: str = 'PDF_CORRUPTED'ΒΆ
- status_code: int = 422ΒΆ
- exception app.core.exceptions.PDFPasswordRequiredError(document_id: str | None = None)[source]ΒΆ
Bases:
FinParseException- error_code: str = 'PDF_PASSWORD_REQUIRED'ΒΆ
- status_code: int = 422ΒΆ
- exception app.core.exceptions.PDFTooManyPagesError(message: str, detail: dict[str, Any] | None = None)[source]ΒΆ
Bases:
FinParseException- error_code: str = 'PDF_TOO_MANY_PAGES'ΒΆ
- status_code: int = 422ΒΆ
- exception app.core.exceptions.PDFWrongPasswordError(message: str, detail: dict[str, Any] | None = None)[source]ΒΆ
Bases:
FinParseException- error_code: str = 'PDF_WRONG_PASSWORD'ΒΆ
- status_code: int = 422ΒΆ
- exception app.core.exceptions.PartialParseError(message: str, detail: dict[str, Any] | None = None)[source]ΒΆ
Bases:
FinParseExceptionRaised when parsing succeeds but with warnings (non-fatal).
- error_code: str = 'PARTIAL_PARSE'ΒΆ
- status_code: int = 207ΒΆ
- exception app.core.exceptions.UnsupportedFormatError(message: str, detail: dict[str, Any] | None = None)[source]ΒΆ
Bases:
FinParseException- error_code: str = 'UNSUPPORTED_FORMAT'ΒΆ
- status_code: int = 415ΒΆ
- exception app.core.exceptions.UploadIncompleteError(message: str, detail: dict[str, Any] | None = None)[source]ΒΆ
Bases:
FinParseException- error_code: str = 'UPLOAD_INCOMPLETE'ΒΆ
- status_code: int = 400ΒΆ