Notify 3rd party upon a policy error

I want to report about JavaScript run-time errors to a 3rd party (via HTTP REST API).

What are my options and what is the best practice ?

Solved Solved
0 1 103
1 ACCEPTED SOLUTION

Make use of fault rules.

When Javascript throws an error, catch it in the Fault rules and use a Service callout policy to send the error to 3rd party HTTP Rest API.

Within the Fault rules, you could also use another Javascript policy using HttpClient to send it to Rest API, but I guess the Service callout approach would be the best practice.

If it is TCP/UDP/File based then Message logging policy is recommended.

View solution in original post

1 REPLY 1

Make use of fault rules.

When Javascript throws an error, catch it in the Fault rules and use a Service callout policy to send the error to 3rd party HTTP Rest API.

Within the Fault rules, you could also use another Javascript policy using HttpClient to send it to Rest API, but I guess the Service callout approach would be the best practice.

If it is TCP/UDP/File based then Message logging policy is recommended.