Collecting Error Details using Statistics Collector Policy in DefaultFaultRule

Hello,

I am trying to collect some analytics in error flow. The dimensions like error code and error message related analytics. so using the statistics collector policy in default fault - response flow.

Below is the statistics collector policy definition,

<StatisticsCollector async='false' continueOnError='false' enabled='true'> 
<Statistics> 
<Statistic name='errmsgstats' ref='error.message' type='string'>
</Statistic> <Statistic name='errmsgcode' ref='error.code' type='string'>
</Statistic>
</Statistics> </StatisticsCollector>

The error response from the API Provider looks like below

<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code>404</code>
<message xml:lang="en-US">
Must be an entity set instead of an entity: 'APIs'.
</message>
</error>

This is not collecting the values of error.code and error.message.

Please suggest me what changes I need to do to make this flow work.

Thank you,

Pradeep

0 0 71
0 REPLIES 0