cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can RUM JS capture or identify a custom error on a xhr request

MikeC
Newcomer

We are having difficulties to find a solution for capturing xhr response.

some of our xhr response would get intercept by a gateway/firewall and response back with plain text error.  (without hitting our app server)

we want to find out how many xhr calls actually hit by firewall and response with "request denied" message.

 

Is there a way we can capture/check xhr response from the client side? 

I have checked "add action properties" and "add custom errors rule".

Didnt look liked either one can validate or capture xhr requests. the xhr requests we have triggered 3-4 times on the background.

 

 

 

1 REPLY 1

Julius_Loman
DynaMight Legend
DynaMight Legend

If you response is HTTP 2xx with just the payload "request denied", then it's not possible to capture this directly with Dynatrace without modifying your app. Dynatrace does not capture any payload (RUM or server-side). So the check must be performed in your app in the XHR callback and you can send the error using the RUM JavaScript API (dtrum.reportError() or dtrum.reportCustomError()). See more here.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts