Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

It seems the agent is picking application-handled exceptions from HttpAsynClient

asynchttpclient
javaagent
newrelicone

#1

Hi, I’m having a problem with an application that uses a wrapper around HttpAsyncClient 4.1.4: We have configured New Relic to ignore certain status codes like 422 but still, we have an error rate reported for requests that end up in a 422.
As you can see in the next screen shot the errors are showing up only as “HttpClientError 422” without stack trace, the handled custom exception surrounding the original error is correctly hidden from New Relic but we still see this coming up:

I’m not sure if it is really associated to the http client (HttpClientError is one of its error classes) or is just reporting the error as an unhandled 422 at the server level.

Could you help me figure it out?

Thanks


#2

Are you able to share more detail with how you added this configuration option?


#3

Hi Jeanie, I was looking for the configuration which is setup up using docker images and I found that in this case, we were overriding the base image behavior which is the one executing a script that updates New Relic’s config (newrelic.yml) with this:
ignore_status_codes: '$NEWRELIC_IGNORE_STATUS_CODES
NEWRELIC_IGNORE_STATUS_CODES is an env variable which we had set, but since we are overriding the entrypoint we are not executing the same scripts and hence not updating new relic’s config.

Sorry for the confusion, this was completely on our side and has nothing to do with HttpAsyncClient as I initially thought (although you asking for the config did help, I completely forgot about the custom image).

Thanks,
Gonzalo


#4

Hello Gonzalo,

Checking in and it sounds like you were able to resolve the issue, that’s great! Thank you for sharing what the fix was, that certainly helps everyone learn from this experience.

Cheers!