milestonexprotectrestpython.xprrestserviceexception
Module: xprrestserviceexception.py
Revision History
Date | Version | Description |
---|---|---|
2023/07/11 | 1.0.0.0 | Initial Version. |
Raised when the XProtect REST server returns an error response to a REST service call.
Initializes a new instance of the class.
Arguments:
- message (str): Exception message text.
- errorText (str): Error text that describes the error.
- errorTextId (str): Error text unique identifier that describes the error.
- propertyName (str): Property name that caused the error.
- httpCode (str): HTTP status code of the error.
- httpReason (str): HTTP reason for the error.
- logsi (SISession): Trace session object that this exception will be logged to, or null to bypass trace logging.
REST Service failure details message text, in the form of:
XProtect REST Service Failure Details: Status Code: {0} - {1} Error Text: {2} Error ID: {3} Property Name: {4}
Error text that describes the error. This value is parsed from the XProtext REST response "errorText" value.
Returns:
The ErrorText property value.
Error text unique identifier that describes the error.
This value is parsed from the XProtext REST response "errorTextId" value.
This is normally only populated for HTTP status code 400 (Bad Request) errors.
Returns:
The ErrorTextId property value.
HTTP status code of the error. This value is copied from the HTTP Response "status_code" value.
Returns:
The HttpCode property value.
HTTP reason for the error. This value is copied from the HTTP Response "reason" value.
Returns:
The HttpReason property value.
Property name that caused the error.
This value is parsed from the XProtext REST response "propertyName" value.
This is normally only populated for HTTP status code 400 (Bad Request) errors.
Returns:
The PropertyName property value.
Returns a formatted message that describes the service failure; this includes the error text, error text id, http code, http reason, message, and property name.
Arguments:
- errorText (str): Error text that describes the error.
- errorTextId (str): Error text unique identifier that describes the error.
- propertyName (str): Property name that caused the error.
- httpCode (str): HTTP status code of the error.
- httpReason (str): HTTP reason for the error.
Returns:
A formatted string representation of the object.