Package gw.api.exceptions.rest

Guidewire provides a number of exception classes in the gw.api.exceptions.rest package. This package contains the following super class that many of the other classes in the packaged extend:
  • RestExceptionWithErrorInfo

The following classes in gw.api.exceptions.rest package provide numeric return values.

Class Return value Meaning
BadInputException 400 Bad Request
CorsException 403 Forbidden
InternalServerErrorException 500 Internal Server Error
NotAcceptableException 406 Not Acceptable
NotAuthorizedException 403 Forbidden
OperationNotSupportedException 405 Method Not Allowed
RestAuthenticationException 401 Unauthorized
ServiceUnavailableException - Service Unavailable
UnsupportedContentTypeException 415 Unsupported Media Type
Note: A 403 error means that the user is not authorized for the requested resource. If you do not want the user to even be aware of the resource, use NotFoundException (404) instead.
The gw.api.exceptions.rest package also contains the following utility classes, called by RestExceptionWithErrorInfo:
  • RequestErrorDetails
  • RequestErrorInfo