Skip to content

Module tifeatures.errors

tifeatures.errors: Error classes.

Variables

DEFAULT_STATUS_CODES
logger

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

InvalidBBox

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

Invalid bounding box coordinates.

Ancestors (in MRO)

  • tifeatures.errors.TiFeaturesError
  • 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.

InvalidDatetime

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

Invalid datetime.

Ancestors (in MRO)

  • tifeatures.errors.TiFeaturesError
  • 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.

InvalidDatetimeColumnName

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

Invalid datetime column name.

Ancestors (in MRO)

  • tifeatures.errors.TiFeaturesError
  • 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.

InvalidGeometryColumnName

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

Invalid geometry column name.

Ancestors (in MRO)

  • tifeatures.errors.TiFeaturesError
  • 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.

InvalidPropertyName

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

Invalid property/column name.

Ancestors (in MRO)

  • tifeatures.errors.TiFeaturesError
  • 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.

MissingDatetimeColumn

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

Table has no datetime column.

Ancestors (in MRO)

  • tifeatures.errors.TiFeaturesError
  • 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.

MissingGeometryColumn

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

Table has no geometry column.

Ancestors (in MRO)

  • tifeatures.errors.TiFeaturesError
  • 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.

NoPrimaryKey

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

Table has no primary key.

Ancestors (in MRO)

  • tifeatures.errors.TiFeaturesError
  • 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.

NotFound

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

Invalid table name.

Ancestors (in MRO)

  • tifeatures.errors.TiFeaturesError
  • 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.

TiFeaturesError

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

Base exception class.

Ancestors (in MRO)

  • builtins.Exception
  • builtins.BaseException

Descendants

  • tifeatures.errors.NotFound
  • tifeatures.errors.NoPrimaryKey
  • tifeatures.errors.MissingGeometryColumn
  • tifeatures.errors.MissingDatetimeColumn
  • tifeatures.errors.InvalidBBox
  • tifeatures.errors.InvalidPropertyName
  • tifeatures.errors.InvalidGeometryColumnName
  • tifeatures.errors.InvalidDatetimeColumnName
  • tifeatures.errors.InvalidDatetime

Class variables

args

Methods

with_traceback

def with_traceback(
    ...
)

Exception.with_traceback(tb) --

set self.traceback to tb and return self.