0

I have a jax rs method that looks like this:

enter image description here

When an exception occurs while updating an employee a status 404 is returned, instead of the status 409 which is thrown with the WebException (extends WebApplicaitonException). I am sure that WebException is being thrown, but for some reason it returns the 404 status instead of the 409. What could cause this to happen?

slipperypete
  • 5,358
  • 17
  • 59
  • 99
  • Are you sure your `catch (Exception e)` has been reached? Maybe `404 Not Found` returned by the container which means the container couldn't find any resource requested. – Jin Kwon Apr 13 '17 at 01:54
  • I'm pretty sure it's a duplicate. If the link doesn't work for you, let me know, and I'll reopen the question. – Paul Samsotha Apr 13 '17 at 02:30
  • Thanks for the link, i searched everywhere and never saw that one! Jeez feel like a goof. Adding ServerProperties.RESPONSE_SET_STATUS_OVER_SEND_ERROR in JerseyConfig worked for me, but setting the value in application.properties did not. – slipperypete Apr 13 '17 at 05:54

0 Answers0