Source code for satorbis_kit.pgstac.exceptions.ingestion

"""Exceptions raised by the STAC ingestion API."""

from typing import Optional


[docs] class IngestionError(Exception): """Base exception for STAC ingestion errors.""" pass
[docs] class ValidationError(IngestionError): """Raised when user inputs are invalid.""" pass
[docs] class APIError(IngestionError): """Raised when a backend API call fails.""" def __init__( self, message: str, status_code: Optional[int] = None, response: Optional[str] = None ): super().__init__(message) self.status_code = status_code self.response = response