The CPI environment uses External Logging to send logs to Splunk. There, the LastError field is readily available:
Important: The LastError field is also populated for messages with status COMPLETED - when an error was caught and handled properly in the iFlow. This is valuable for monitoring because you can see errors that were gracefully handled and potentially returned to the sender system, even though the message processing itself succeeded.
However, when querying the OData v2 API (/api/v1/MessageProcessingLogs), this field is not exposed. The ErrorInformation is only available as a deferred navigation property:
{
"ErrorInformation": {
"__deferred": {
"uri": ".../MessageProcessingLogErrorInformations('guid')"
}
}
}GET /MessageProcessingLogs?$expand=ErrorInformationResult: 501 Not Implemented
This is the most obvious approach, but CPI doesn't support it. There are SAP Influence requests for this:
GET /MessageProcessingLogs('guid')?$select=MessageGuid,LastError,StatusResult: Field not available in API response
The LastError field exists internally (Splunk receives it), but is not exposed via OData.
POST /$batch
Content-Type: multipart/mixed; boundary=batch_123Result: 404 - The $batch endpoint doesn't exist for MessageProcessingLogErrorInformations
The only method I found is calling each message individually:
GET /MessageProcessingLogErrorInformations('MessageGuid')/$valueThis returns the plain text error message. But for thousands of messages, this means thousands of API calls.
I'm currently using parallel HTTP requests as a workaround, but it feels inefficient when Splunk already receives this data automatically via External Logging.
Has anyone found a better approach? Maybe there's an undocumented feature or a way to access the External Logging stream directly?
Let me know in the comments!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 54 | |
| 33 | |
| 23 | |
| 21 | |
| 19 | |
| 16 | |
| 15 | |
| 15 | |
| 14 | |
| 10 |