Determines how errors within WebApp Server are sent to the client
Type: Property
Access: Read/Write
Data Type: Integer
Parameters:
None
Syntax
Property Integer peErrorType
Get peErrorType to IntegerVariable |
Set peErrorType to IntegerVariable/Value |
Description
Determines how errors within WebApp Server are sent to the client.
The status code will be 500, but this property determines the contents of the response body. The default is set to HTML, which means that an HTML error page is sent to the client. Note that if errors occur before or during the reading of the configuration, then an HTML page will be sent.
Constant | Meaning | |
httpErrorHtml | Sends the error description inside an HTML page. |
httpErrorJson | Sends the error as an JSON object. |
httpErrorSoap | Sends back a SOAP error. |
httpErrorEmpty | Leaves the body of the response empty. |
Only errors that cause the request not to reach the web application are reported this way.
Object oErrorTest is a cWebHttpHandler
Set psPath to "test_"
Set peErrorType to httpErrorSoap // This causes a SOAP Fault when the WebApp is NOT running
Procedure OnHttpRequest String sVerb String sPath String sContentType String sAcceptType Integer iSize
Error 300 "This is a test for SOAP fault"
// This Error is NOT reported as a SOAP error
End_Procedure
End_Object