StatisticsCollector - record errors

I have a 99% pure nodejs proxy and am having some trouble getting analytics data populated...

I grudgingly added a StatisticsCollector policy and have been able to get traffic etc recorded by Developer-App and so on, including custom fields. Also, when drilling into that traffic I can see status codes.

What I haven't been able to figure out is how to get a record to be treated as an Error one and show up in any of the various Error count/% reports. My proxy always shows as 100% error free.

Really hoping I'm not forced to add another policy (FaultRule pressumably) just to achieve this?

Thanks in advance.

PS - Related question, is there a way to see the raw data recorded by the statistics collector?

That would make the whole collection and custom report generation 100x easier! Even if it were just available during a Proxy Trace session.....

0 1 128
1 REPLY 1

You can return status and error details from Node.js in flow variables and then use Fault Rules and Raise Fault policy to handle the error. See here for a great discussion that might be useful.