Issue with Excluding 401 Response Code from Failures

Hi,

I’ve been receiving 401 response codes for a few APIs and would like to exclude this status code, treating it as a success instead. I tried overriding the general parameters and set the HTTP parameter as follows [snip attached], but I’m still seeing requests marked as failures due to the 401 response code. What can be the reason for this?
 


 
Thanks

Are these failed requests throwing exceptions? Dynatrace sometimes marks requests as failed when it detects exceptions, even with successful HTTP status codes. You can verify this in the trace and configure exception rules to ignore specific cases if needed.

For more details, please check scenario 1 in the relevant KB article or refer to the documentation.

Yes the failed requests are throwing exceptions, and that means i will have to mark all the exceptions [failing with 401] as ignored exceptions?

Correct. I suggest testing this by ignoring one specific exception first to confirm if this is the root cause.

Hi @jatinarora

I think that something that may be more useful for the case you indicate is to apply “Success forcing exceptions”

By configuring the exception class and message, you can make the request be considered successful.
I hope its helpful :flexed_biceps: