Package org.craftercms.commons.rest
Class RestServiceException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.springframework.core.NestedRuntimeException
-
- org.springframework.web.client.RestClientException
-
- org.craftercms.commons.rest.RestServiceException
-
- All Implemented Interfaces:
Serializable
public class RestServiceException extends org.springframework.web.client.RestClientException
Exception thrown when an error is received from a REST service. TheerrorDetails
holds the details of the error, and can be anything the service wants to return.- Author:
- avasquez
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Object
errorDetails
protected org.springframework.http.HttpStatus
responseStatus
-
Constructor Summary
Constructors Constructor Description RestServiceException(org.springframework.http.HttpStatus responseStatus, Object errorDetails)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getErrorDetails()
org.springframework.http.HttpStatus
getResponseStatus()
-
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
responseStatus
protected org.springframework.http.HttpStatus responseStatus
-
errorDetails
protected Object errorDetails
-
-
Constructor Detail
-
RestServiceException
public RestServiceException(org.springframework.http.HttpStatus responseStatus, Object errorDetails)
-
-
Method Detail
-
getResponseStatus
public org.springframework.http.HttpStatus getResponseStatus()
-
getErrorDetails
public Object getErrorDetails()
-
-