Software AG Products 10.7 | Integrating On-Premises and Cloud Applications | Integration Cloud | Built-In Services | Built-In Services | getLastError
 
getLastError
Obtains detailed information about the last error that was trapped within an Integration.
Input Parameters
None
Output Parameters
lastError
Document. Information about the last error, which contains details of the time, error, user, block, and call stack information.
Key
Description
time
String. Date and time the event occurred, in the format yyyy/MM/dd HH:mm:ss.SSS
error
String. Optional. Error message of the exception.
localizedError
String. Optional. Error message in the language that corresponds to the server locale.
user
String. User who executed the Integration.
block
Document. Contains the following fields:
Key
Description
name
String. Integration, Operation, or Service name.
type
String. Application, Integration, or Service.
details
String. Optional. Account and Application name if the Block Type is “Application”.
callStack
Document List. The call stack information describing where the error occurred including details of the block. Each document represents a block on the call stack. The first document in the list represents the block that threw the error and the last document in the list represents the top level block. It contains the following fields:
Key
Description
name
String. Integration, Operation or Service name.
type
String. Application, Integration, or Service.
details
String. Optional. Account and Application name if the Block Type is “Application”.
Usage Notes
You can use this service in the catch section of the try-catch block. Each execution of an Integration or a service (whether the Integration or the service succeeds or fails) updates the value returned by getLastError. Consequently, getLastError itself resets the value of lastError. Therefore, if the results of getLastError will be used as input to subsequent Integrations, map the value of lastError to a variable in the pipeline.
If a map has multiple transformers, then a subsequent call to getLastError will return the error associated with the last failed transformer in the map, even if it is followed by successful transformers.