gisserver.exceptions module

Exceptions for the WFS operations.

Not all exception codes are listed here, only the one that apply to the current conformance class.

See: https://docs.opengeospatial.org/is/09-025r2/09-025r2.html#35 https://docs.opengeospatial.org/is/09-025r2/09-025r2.html#411

exception gisserver.exceptions.ExternalParsingError

Bases: ValueError

Raise a ValueError for a parsing problem.

exception gisserver.exceptions.ExternalValueError

Bases: ValueError

Raise a ValueError for external input. This helps to distinguish between internal bugs (e.g. unpacking values) and malformed external input.

exception gisserver.exceptions.InvalidParameterValue(text=None, code=None, locator=None, status_code=None)

Bases: WFSException

Unsupported choice, e.g. unsupported CRS, bad resultType.

exception gisserver.exceptions.InvalidXmlElement

Bases: ExternalParsingError

Raise a ValueError when a particular XML tag wasn’t expected.

exception gisserver.exceptions.MissingParameterValue(text=None, code=None, locator=None, status_code=None)

Bases: WFSException

Required parameter is missing

exception gisserver.exceptions.NotFound(text=None, code=None, locator=None, status_code=None)

Bases: WFSException

The requested ResourceId could not be found.

exception gisserver.exceptions.OWSException(text=None, code=None, locator=None, status_code=None)

Bases: Exception

Base class for XML based exceptions in this module.

__init__(text=None, code=None, locator=None, status_code=None)
as_response() HttpResponse

Return the excetion as HTTP response.

as_xml() str

Serialize the exception to an XML string.

exception gisserver.exceptions.OperationNotSupported(text=None, code=None, locator=None, status_code=None)

Bases: WFSException

WFS Method is called, but does not exist on this server.

exception gisserver.exceptions.OperationParsingFailed(text=None, code=None, locator=None, status_code=None)

Bases: WFSException

Error parsing the request to a WFS method.

exception gisserver.exceptions.OperationProcessingFailed(text=None, code=None, locator=None, status_code=None)

Bases: WFSException

Error while processing the request.

exception gisserver.exceptions.OptionNotSupported(text=None, code=None, locator=None, status_code=None)

Bases: WFSException

exception gisserver.exceptions.PermissionDenied(text=None, code=None, locator=None, status_code=None)

Bases: WFSException

Permission denied (custom error).

Note this error is not part of the spec, but it’s still useful to have access controls.

exception gisserver.exceptions.VersionNegotiationFailed(text=None, code=None, locator=None, status_code=None)

Bases: WFSException

GetCapabilities called with unsupported versions.

exception gisserver.exceptions.WFSException(text=None, code=None, locator=None, status_code=None)

Bases: OWSException

exception gisserver.exceptions.XmlElementNotSupported

Bases: ExternalParsingError

Raise a ValueError when an XML tag is not known by the parser at all.

gisserver.exceptions.wrap_filter_errors(query: wfs20.QueryExpression)

Perform a QuerySet/filter creation operation. and trap many parser errors in the making of it.

gisserver.exceptions.wrap_parser_errors(name: str, locator: str)

Convert the value into a Python format. This catches any typical exceptions and transforms them into an OWSException.