DataRequest - Failed Event

Fired when the Webroutine request fails

Member of DataRequest (PRIM_WEB.DataRequest)


NameTypeData TypeDescription
Reason*InputEnumerationReason code for the request failure
Handled*BothBooleanAllow the error to be handled in the routine or forwarded to the application


The Failed event is fired when the execution of a SrvRoutine fails.
By default the runtime will end and an error message will appear in the browser. However, by monitoring for the event and setting the Handled parameter to True, the default error handling processing can be overridden and an application can be coded to better handle a failure.
Failures not managed at this level can still be processed using the RequestFailed event.


Enum ValueDescription
ServerErrorAn error occurred when executing the SrvRoutine. Check the joblog and x_err.log for further information
SessionInvalidThere is no valid session available on the server.
LicenseInvalidThe server license has expired


In this example, when the request fails, some UI disabling code is called.
The Handled parameter has not been set, so the error processing will continue. The error and can still be handled globally using RequestFailed, allowing the client application to continue.
Mthroutine Name(GetData)
   Define_Com Class(#MyServerModule.GetData) Name(#GetData)
   Evtroutine Handling(#GetData.Completed)
      * Update UI with data
   Evtroutine Handling(#GetData.Failed)

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020