Skip to content

Module titiler.core.errors

Titiler error classes.

Variables

DEFAULT_STATUS_CODES

Functions

add_exception_handlers

def add_exception_handlers(
    app: fastapi.applications.FastAPI,
    status_codes: Dict[Type[Exception], int]
) -> None

Add exception handlers to the FastAPI app.

exception_handler_factory

def exception_handler_factory(
    status_code: int
) -> Callable

Create a FastAPI exception handler from a status code.

Classes

BadRequestError

class BadRequestError(
    /,
    *args,
    **kwargs
)

Bad request error.

Ancestors (in MRO)

  • titiler.core.errors.TilerError
  • builtins.Exception
  • builtins.BaseException

Class variables

args

Methods

with_traceback

def with_traceback(
    ...
)

Exception.with_traceback(tb) --

set self.traceback to tb and return self.

TileNotFoundError

class TileNotFoundError(
    /,
    *args,
    **kwargs
)

Tile not found error.

Ancestors (in MRO)

  • titiler.core.errors.TilerError
  • builtins.Exception
  • builtins.BaseException

Class variables

args

Methods

with_traceback

def with_traceback(
    ...
)

Exception.with_traceback(tb) --

set self.traceback to tb and return self.

TilerError

class TilerError(
    /,
    *args,
    **kwargs
)

Base exception class.

Ancestors (in MRO)

  • builtins.Exception
  • builtins.BaseException

Descendants

  • titiler.core.errors.TileNotFoundError
  • titiler.core.errors.BadRequestError

Class variables

args

Methods

with_traceback

def with_traceback(
    ...
)

Exception.with_traceback(tb) --

set self.traceback to tb and return self.