httk.optimade.model.errors

Exceptions

OptimadeError

Common base class for all non-exit exceptions.

TranslatorError

Common base class for all non-exit exceptions.

Functions

translator_error_from(→ TranslatorError)

Wrap a neutral FilterTranslationError

Module Contents

exception httk.optimade.model.errors.OptimadeError(message: str, response_code: int, response_message: str, longmsg: str | None = None)[source]

Bases: Exception

Common base class for all non-exit exceptions.

response_code[source]
response_msg[source]
content[source]
exception httk.optimade.model.errors.TranslatorError(message: str, response_code: int, response_message: str, longmsg: str | None = None)[source]

Bases: OptimadeError

Common base class for all non-exit exceptions.

httk.optimade.model.errors.translator_error_from(error: httk.data.optimade_query.FilterTranslationError) TranslatorError[source]

Wrap a neutral FilterTranslationError into a TranslatorError carrying the corresponding HTTP status.