Package com.yahoo.restapi
Class RestApiException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.yahoo.restapi.RestApiException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
RestApiException.BadRequest
,RestApiException.Conflict
,RestApiException.Forbidden
,RestApiException.InternalServerError
,RestApiException.MethodNotAllowed
,RestApiException.NotFound
,RestApiException.Unauthorized
public class RestApiException extends RuntimeException
ARuntimeException
that represents a http response.- Author:
- bjorncs
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RestApiException.BadRequest
static class
RestApiException.Conflict
static class
RestApiException.Forbidden
static class
RestApiException.InternalServerError
static class
RestApiException.MethodNotAllowed
static class
RestApiException.NotFound
static class
RestApiException.Unauthorized
-
Constructor Summary
Constructors Constructor Description RestApiException(int statusCode, String errorType, String message)
RestApiException(int statusCode, String errorType, String message, Throwable cause)
RestApiException(HttpResponse response, String message)
RestApiException(HttpResponse response, String message, Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpResponse
response()
int
statusCode()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
RestApiException
public RestApiException(HttpResponse response, String message)
-
RestApiException
public RestApiException(int statusCode, String errorType, String message, Throwable cause)
-
RestApiException
public RestApiException(HttpResponse response, String message, Throwable cause)
-
-
Method Detail
-
statusCode
public int statusCode()
-
response
public HttpResponse response()
-
-