gws.base.ows.server.error

OWS exceptions.

Source code: gws.base.ows.server.error

Module Contents

exception gws.base.ows.server.error.BadRequest(*args)

Bases: Error

The request is invalid (HTTP 400).

exception gws.base.ows.server.error.CannotLockAllFeatures(*args)

Bases: Error

Not all requested features could be locked.

exception gws.base.ows.server.error.CurrentUpdateSequence(*args)

Bases: Error

The update sequence equals the current one.

exception gws.base.ows.server.error.DuplicateStoredQueryIdValue(*args)

Bases: Error

A stored query with this id already exists.

exception gws.base.ows.server.error.DuplicateStoredQueryParameterName(*args)

Bases: Error

A stored query parameter name is used more than once.

exception gws.base.ows.server.error.Error(*args)

Bases: gws.Error

OWS error.

The class name is used as the OWS exception code. The HTTP status is derived from the code, 400 by default.

code = 'Error'
locator
message
status
to_image_response(mime_type='image/png') → gws.ContentResponse

Create an image response for this error.

The image is a single error pixel.

Parameters:

mime_type – Image mime type.

Returns:

The image response.

to_xml_response(xmlns='ows') → gws.ContentResponse

Create an XML response for this error.

Parameters:

xmlns – Format to use: ows for an OWS ExceptionReport, ogc for an OGC ServiceExceptionReport.

Returns:

The XML response.

Raises:

gws.Error – If xmlns is invalid.

exception gws.base.ows.server.error.FeaturesNotLocked(*args)

Bases: Error

The features to modify are not locked.

exception gws.base.ows.server.error.Forbidden(*args)

Bases: Error

Access to the requested resource is forbidden (HTTP 403).

gws.base.ows.server.error.from_exception(exc: Exception) → Error

Convert an exception to an OWS error.

gws.NotFoundError, gws.ForbiddenError and gws.BadRequestError are mapped to the corresponding errors, any other exception is logged and becomes NoApplicableCode. OWS errors are returned unchanged.

Parameters:

exc – An exception.

Returns:

The OWS error. A converted error has exc as its cause.

exception gws.base.ows.server.error.InvalidCRS(*args)

Bases: Error

The requested CRS is not supported.

exception gws.base.ows.server.error.InvalidDimensionValue(*args)

Bases: Error

A dimension parameter has an invalid value.

exception gws.base.ows.server.error.InvalidFormat(*args)

Bases: Error

The requested format is not supported.

exception gws.base.ows.server.error.InvalidLockId(*args)

Bases: Error

The lock id is invalid.

exception gws.base.ows.server.error.InvalidParameterValue(*args)

Bases: Error

A parameter has an invalid value.

exception gws.base.ows.server.error.InvalidPoint(*args)

Bases: Error

The point coordinates are invalid.

exception gws.base.ows.server.error.InvalidUpdateSequence(*args)

Bases: Error

The update sequence is greater than the current one.

exception gws.base.ows.server.error.InvalidValue(*args)

Bases: Error

A value is invalid.

exception gws.base.ows.server.error.LayerNotDefined(*args)

Bases: Error

The requested layer does not exist.

exception gws.base.ows.server.error.LayerNotQueryable(*args)

Bases: Error

The requested layer cannot be queried.

exception gws.base.ows.server.error.LockHasExpired(*args)

Bases: Error

The lock has expired.

exception gws.base.ows.server.error.MissingDimensionValue(*args)

Bases: Error

A required dimension value is missing.

exception gws.base.ows.server.error.MissingParameterValue(*args)

Bases: Error

A required parameter is missing.

exception gws.base.ows.server.error.NoApplicableCode(*args)

Bases: Error

No other exception code applies, e.g. an internal server error.

exception gws.base.ows.server.error.NotFound(*args)

Bases: Error

The requested resource was not found (HTTP 404).

exception gws.base.ows.server.error.OperationNotSupported(*args)

Bases: Error

The requested operation is not supported.

exception gws.base.ows.server.error.OperationParsingFailed(*args)

Bases: Error

The request could not be parsed.

exception gws.base.ows.server.error.OperationProcessingFailed(*args)

Bases: Error

The request could not be processed.

exception gws.base.ows.server.error.OptionNotSupported(*args)

Bases: Error

The requested option is not supported.

exception gws.base.ows.server.error.PointIJOutOfRange(*args)

Bases: Error

The pixel coordinates are outside the tile.

exception gws.base.ows.server.error.ResponseCacheExpired(*args)

Bases: Error

The cached response has expired.

exception gws.base.ows.server.error.StyleNotDefined(*args)

Bases: Error

The requested style does not exist.

exception gws.base.ows.server.error.TileOutOfRange(*args)

Bases: Error

The tile row or column is out of range.

exception gws.base.ows.server.error.VersionNegotiationFailed(*args)

Bases: Error

None of the requested versions is supported.