Hi, good question. For tracking failures in custom services, here are the best approaches:
Infolog/Event Log — add try/catch in your service class and log errors using info(), warning() or error() so failures are captured in the infolog.
Custom log table — create a staging/log table in D365FO to store each request, response, status and error message. This gives you full visibility of every call made.
Application Insights — integrate with Azure Application Insights to monitor API calls, failures and exceptions in real time from outside D365FO.
Trace Parser — if the issue is on the D365FO side (X++ execution), use Trace Parser to drill down into what happened during that service call.
For the external system side, always ask them to log the HTTP response code and error message they receive — that helps quickly identify whether the failure is on D365FO side or their side.
Best practice is to combine a custom log table (for business-level tracking) with Application Insights (for technical monitoring). Thanks,