Skip to content

warnings

Server warnings.

The warnings in this module will all be caught by middleware and added to the response under meta.warnings.

OptimadeGatewayWarning

Bases: OptimadeWarning

Base Warning for the optimade-gateway package.

Source code in optimade_gateway/warnings.py
12
13
class OptimadeGatewayWarning(OptimadeWarning):
    """Base Warning for the `optimade-gateway` package."""

SortNotSupported

Bases: OptimadeGatewayWarning

Sorting (the sort query parameter) is currently not supported for gateway queries to external OPTIMADE databases. See https://optimade.org/optimade-gateway#sorting for more information.

Source code in optimade_gateway/warnings.py
16
17
18
19
class SortNotSupported(OptimadeGatewayWarning):
    """Sorting (the `sort` query parameter) is currently not supported for gateway
    queries to external OPTIMADE databases. See
    https://optimade.org/optimade-gateway#sorting for more information."""