I work for New Relic.
While there is no Java Agent API call to ignore an error, I have filed a feature request to create such a call. However, this won't help you in the near term since we won't be able to promise a timeline on when or if we'll implement this.
So, here is the nature of the things our agent calls errors - perhaps you will be able to change your code a bit so that the error is not noticed by our agent? Effectively, once you handle an exception and DO NOT call the noticeError() method, the exception will not be categorized as or recorded as an error in New Relic. Any chance you can add an exception handler to render your 40x pages instead of letting those exceptions go unhandled?
You can also choose to ignoreTransaction() on the entire transaction, which will cause it not to be categorized as an error either. It's suboptimal since preferably you watch all of your production traffic to know when your error handler itself gets slow or ends up creating its own (unexpected) error, but this should work as well.
Finally, you can ignore HTTP status codes and specific exception names in your agent config - either newrelic.yml (if you use client side config) or on your application settings page (https://rpm.newrelic.com/accounts/X/applications/Y/edit) page if you use server side config.
Note that ignoring a status code or exception name via agent config will only prevent the error from being logged individually, but will still add to the error count / Error Rate, upon which you might be alerting; handling the exception or calling ignoreTransaction() will purge it from the error rate as well.
If none of these approaches work for you, we'd be happy to talk with you further, but you should open a support ticket at https://support.newrelic.com , since this isn't the right forum for discussion.