Constructor and Description |
---|
GenerateErrorResponse() |
Modifier and Type | Method and Description |
---|---|
ErrorReport |
get(int status,
String message)
Generate an error report.
|
@GET @Produces(value="application/json") public ErrorReport get(@QueryParam(value="status") @DefaultValue(value="404") int status, @QueryParam(value="message") @DefaultValue(value="This is a diagnostic error response") String message)
status
- HTTP status to return. When invalid code given "500"
(Response.Status#INTERNAL_SERVER_ERROR
) is used.message
- Message to return in ErrorReport.message