Class: QgsServerException

class qgis.server.QgsServerException

Bases: sip.wrapper

Exception base class for server exceptions.

QgsServerException(message: str, responseCode: int = 500) Constructor

QgsServerException(QgsServerException)

Methods

formatResponse

Formats the exception for sending to client

responseCode

rtype:

int

formatResponse(self) Tuple[QByteArray, str]

Formats the exception for sending to client

Return type:

Tuple[QByteArray, str]

Returns:

  • QByteArray The formatted response.

  • responseFormat: QString to store the content type of the response format.

The default implementation returns text/xml format.

responseCode(self) int
Return type:

int

Returns:

the return HTTP response code associated with this exception