httk.serve.optimade.model.errors¶
Exceptions¶
Represent an OPTIMADE response error. |
|
Represent a filter translation failure with an HTTP response contract. |
Functions¶
|
Wrap a neutral |
Module Contents¶
- exception httk.serve.optimade.model.errors.OptimadeError(message, response_code, response_message, longmsg=None)[source]¶
Bases:
ExceptionRepresent an OPTIMADE response error.
- Parameters:
- exception httk.serve.optimade.model.errors.TranslatorError(message, response_code, response_message, longmsg=None)[source]¶
Bases:
OptimadeErrorRepresent a filter translation failure with an HTTP response contract.
- httk.serve.optimade.model.errors.translator_error_from(error)[source]¶
Wrap a neutral
FilterTranslationErrorfor HTTP output.- Parameters:
error (httk.store.FilterTranslationError) – Neutral filter translation failure to classify.
- Returns:
A translated error carrying the corresponding HTTP status.
- Return type: