How to get lastError in a model's error handler

When a model’s general error handler step gets control it seems that the getLastError service is ineffective at retrieving the last error information, maybe because the processing done behind the scenes to get to the error step is successful and thus getLastError no longer returns any error.

Is there any way with the error step of a model to get information on the error that occurred, such as the service name where the error occurred and the error that occurred, so this information can be logged?

Just checking,
Dick Salisbury

Hi,

In the error handler :

Create a pipeline document with the name “perror” and map “perror” to “getLastError”. You would get the error details.

Hope it helps.

Regars,
Sumit

Thanks Sumit,
I had opened an SR with webMethod support while waiting for a reply here, and they confirmed your suggestion. In addition, they suggested that using step-level error handlers gave a little more control than just a single process-level error handler.
I appreciate your help,
Dick

Welcome always :slight_smile: