27 Dec 2024 08:37 AM
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
27 Dec 2024 09:23 AM - edited 27 Dec 2024 09:24 AM
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.
27 Dec 2024 09:27 AM
Yes the failed requests are throwing exceptions, and that means i will have to mark all the exceptions [failing with 401] as ignored exceptions?
27 Dec 2024 09:43 AM
Correct. I suggest testing this by ignoring one specific exception first to confirm if this is the root cause.
27 Dec 2024 07:52 PM
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
By configuring the exception class and message, you can make the request be considered successful.
I hope its helpful 💪