httk.serve.optimade.endpoints.error

Format exceptions as OPTIMADE JSON:API error responses.

Functions

format_optimade_error(ex, request, config[, version])

Format an exception as an OPTIMADE error response.

Module Contents

httk.serve.optimade.endpoints.error.format_optimade_error(ex, request, config, version=optimade_default_version)[source]

Format an exception as an OPTIMADE error response.

Parameters:
Returns:

JSON:API error response.

Return type:

httk.serve.optimade.model.request.EndpointResponse