cata_log_hub.api.common module

class cata_log_hub.api.common.HTTPStatusError[source]

Bases: BaseModel

Basic data model for a HTTP status error response. Intentionally close to the FastAPI default.

detail: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class cata_log_hub.api.common.ValidationError[source]

Bases: BaseModel

Data model for a validation error. Intentionally close to the pydantic default.

type: str
loc: list[str]
msg: str
input: str | None
ctx: str | None
classmethod convert_loc(loc)[source]

Convert input to string.

Return type:

list[str]

Parameters:

loc (list[object])

classmethod convert_input(input)[source]

Convert input to string.

Return type:

str | None

Parameters:

input (object | None)

classmethod convert_ctx(ctx)[source]

Convert ctx to string.

Return type:

str | None

Parameters:

ctx (object | None)

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class cata_log_hub.api.common.HTTPValidationError[source]

Bases: BaseModel

Data model for a HTTP validation response. Intentionally close to the FastAPI default.

detail: list[ValidationError]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

async cata_log_hub.api.common.validation_exception_handler(request, exc)[source]

Handler for request validation errors.

Return type:

JSONResponse

Parameters:
  • request (Request)

  • exc (RequestValidationError)