public class ResponseException extends OS4JException
| Modifier and Type | Field and Description |
|---|---|
protected String |
requestId |
protected String |
requestInfo |
protected int |
status |
| Constructor and Description |
|---|
ResponseException(String message,
int status) |
ResponseException(String message,
int status,
Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
int |
getStatus() |
static ResponseException |
mapException(HttpResponse response) |
static ResponseException |
mapException(HttpResponse response,
String message) |
static ResponseException |
mapException(String message,
int status)
Deprecated.
|
static ResponseException |
mapException(String message,
int status,
Throwable cause)
Maps an Exception based on the underlying status code
|
void |
setRequestId(String id) |
void |
setRequestInfo(HttpRequest<?> request) |
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic ResponseException(String message, int status)
public int getStatus()
public void setRequestInfo(HttpRequest<?> request)
public void setRequestId(String id)
@Deprecated public static ResponseException mapException(String message, int status)
message - the messagestatus - the statuspublic static ResponseException mapException(String message, int status, Throwable cause)
message - the messagestatus - the statuscause - the causepublic static ResponseException mapException(HttpResponse response)
public static ResponseException mapException(HttpResponse response, String message)
Copyright © 2020. All rights reserved.