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

Issue with Excluding 401 Response Code from Failures

jatinarora
Frequent Guest

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?
 HTTP 401.png 
Thanks

4 REPLIES 4

sia_h
Dynatrace Champion
Dynatrace Champion

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?

sia_h
Dynatrace Champion
Dynatrace Champion

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

PierreGutierrez
Dynatrace Pro
Dynatrace Pro

Hi @jatinarora 

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

https://docs.dynatrace.com/docs/shortlink/service-failure-detection#general

PierreGutierrez_0-1735328976188.png

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

Pierre Gutierrez - LATAM ACE Consultant - Loving Cats! Loving Technology !

Featured Posts