GenerateErrorResponse Resource

Diagnostic resource to generate error response. The same error response is used in other parts of the API when a request fails.

GET /generate-error-response

Generate an error report.

Request Parameters
name type description default constraints
message query Message to return in ErrorReport#message This is a diagnostic error response  
status query HTTP status to return. When invalid code given "500" (Response.Status#INTERNAL_SERVER_ERROR) is used. 404 int
Response Body
media type data type description
application/json ErrorReport (JSON) Error response normally returned upon errors

Example

Request
GET /generate-error-response
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "statusCode" : 12345,
  "statusReasonPhrase" : "...",
  "statusClass" : "...",
  "message" : "...",
  "exceptionMessage" : "...",
  "exceptionStackTrace" : "..."
}