How is your experience with the OutSystems Community?
15
Views
3
Comments
Response trace logged and sent to email
Question

Hi All,

One of the requirement is,

1.When the api fails in a chain of apis,The audit log to be maintained as which api failed and the related log and all this clubbed failed apis to be sent to email.

2.Also Is there any possibility to retry the api which is failed again from the chain of apis from the failure point and retry one attempt and if still fails then log the message and email.

Regards



2026-06-20 17-43-43
Sherif El-Habibi
Champion

Hello @Preeti zade ,

Most of these requirements can be achieved by creating a reference table. For example, you can create a table called API_Logs that contains fields such as API name, last run date, IsSuccess, and other relevant details.

You can then use this table as a reference for all the chained APIs and build your logic around it, whether for retry mechanisms, tracking execution status, or logging purposes.

2024-01-31 05-29-41
Akshay Deshpande

Hi Preeti,

Adding a few best-practice points:

1. Failure tracking

  • Use Exception Handlers in Service Actions to capture the exact failure point.
  • Log details using ExceptionMessage() and ExceptionStack().
  • Maintain a correlation ID to track the full API chain.

2. Retry mechanism

  • OutSystems doesn’t support automatic retry → needs custom logic.
  • Retry only for transient errors (timeouts, network).
  • Limit retries (1–2 max).
  • Store last successful step to resume from failure point.
  • Prefer Timer-based retry instead of immediate retry.

3. Email notification

  • Avoid sending emails directly in flow.
  • Log first, then use a Timer to send aggregated failure emails.

4. Good practices

  • Keep APIs idempotent for safe retry.
  • Avoid tight coupling between APIs.
  • Don’t log sensitive data.

Thanks and Regards,
Akshay Deshpande

UserImage.jpg
Preeti zade

Hi Akshay,

Any  sample  possible to provide as a reference ,How to resume from failure point or if in a chain of apis if out of 5 apis 2 failes in between ,will the flow continue or it will be aborted fo r rest apis.

Regards

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.