HTTP Status Codes
By default, a 200 (OK) status is automatically set as the HTTP status when a Java method executes successfully.
Other status codes can be generated by throwing a {@link oajr.RestException} with a specific HTTP status code, or calling {@link javax.servlet.http.HttpServletResponse#setStatus(int)}.
Non-OK (200) status codes are automatically triggered by the following conditions:
Unauthorized | A {@link oajr.RestGuard guard} prevented the method from being executed | |
Not Found | No matching path patterns were found on any method | |
Method Not Implemented | A path pattern matched, but no Java methods were found for the HTTP method | |
Not Acceptable |
A path pattern matched, but no Java methods were found with a matching serializer for the
|
|
Precondition Failed | A path pattern matched, but no Java methods were found that were not rejected by {@link oajr.RestMatcher matchers} | |
Unsupported Media Type |
A path pattern matched, but no Java methods were found with a matching parser for the
|
|
Internal Server Error | The Java method threw an exception other than {@link oajr.RestException} |