users@jersey.java.net

how to catch 405 errors.

From: Diego Gil <diego.a.gil_at_gmail.com>
Date: Wed, 21 Apr 2010 11:43:15 -0300

Hi,

We are developing a small web services repository with Jersey and facing
now a little issue with error messages.

If the client makes a wrong request, calling a non existing method due
to a typo, gets a 405 response. That is ok but we would like to catch
this exception to use a custom format.

There is any example of that ?.

We should use ExceptionMapper or there is another hook to catch that
early errors?

Thanks,
Diego.