Issue Details (XML | Word | Printable)

Key: OPENPTK-330
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Scott Fehrman
Reporter: Scott Fehrman
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
openptk

Limit use of WebApplicationException

Created: 14/Mar/12 01:32 AM   Updated: 08/May/12 02:47 AM   Resolved: 24/Mar/12 09:28 PM
Component/s: Server
Affects Version/s: 2.0, 2.1
Fix Version/s: 2.1

Time Tracking:
Not Specified

Tags: jersey jax-rs server
Participants: Scott Fehrman and Terry Sigle


 Description  « Hide

Enhance the Resource code to handle exceptions with appropriate HTTP 400/500 Response instead of throwing WebApplicationException, where possible.



Scott Fehrman added a comment - 24/Mar/12 09:28 PM

Implemented solution. The use of WebApplicationException is limited to the constructor method for Resource.java. All other "run time" exceptions (EngineException) are caught and an Internal Server Error (500) is sent back to the client.


Terry Sigle added a comment - 08/May/12 02:47 AM

Confirmed with a code review of the org.openptk.jaxrs.Resource.java and child classes to confirm that the WebApplicationException is being thrown properly and/or an INTERNAL_SERVER_ERROR is being used properly.