milestonexprotectwspython.xpwwebserviceexception
Module: xpwwebserviceexception.py
Revision History
Date | Version | Description |
---|---|---|
2023/07/11 | 1.0.0.0 | Initial Version. |
Raised when the XProtect Web server returns an error response to a web 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.
Web Service failure details message text, in the form of:
XProtect Web Service Failure Details: Status Code: {0} - {1} Error Text: {2} Error ID: {3} Property: {4}
Error text that describes the error. This value is parsed from the XProtext web-service response "errorText" value.
Returns:
The ErrorText property value.
Error text unique identifier that describes the error.
This value is parsed from the XProtext web-service 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 web-service 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.