KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
If you are looking for /Resource/Id and that resource does not exist, I had always though that 404 was the appropriate response. However, when returning null from a Jersey handler, I get back a "204 No Content". I can likely work with either one, but am curious to others thoughts on this. To answer my own next question. To get Jersey to return 404 you must throw an exception. if (a == null) throw new WebApplicationException(404);
Tags (comma-separated)
Save Edits
Cancel