Class: QgsServerException

Exception base class for server exceptions.

class qgis.server.QgsServerException[source]

Bases: object

__init__(message: str | None, responseCode: int = 500)

Constructor

Parameters:
  • message (Optional[str])

  • responseCode (int = 500)

__init__(a0: QgsServerException)
Parameters:

a0 (QgsServerException)

virtual formatResponse(self)[source]

Formats the exception for sending to client

Returns:

  • QByteArray The formatted response.

  • responseFormat: the content type of the response format.

The default implementation returns text/xml format.

responseCode(self) int[source]

Returns the return HTTP response code associated with this exception.

Return type:

int