Package com.couchbase.client.core.error
Class HttpStatusCodeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.couchbase.client.core.error.CouchbaseException
-
- com.couchbase.client.core.error.HttpStatusCodeException
-
- All Implemented Interfaces:
Serializable
@Internal public class HttpStatusCodeException extends CouchbaseException
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HttpStatusCodeException(com.couchbase.client.core.deps.io.netty.handler.codec.http.HttpResponseStatus status, String content, Request<?> request, ErrorContext errorContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
content()
HTTP response body as a String.static ResponseStatus
couchbaseResponseStatus(Throwable t)
static String
httpResponseBody(Throwable t)
int
httpStatusCode()
ResponseStatus
responseStatus()
Returns the Couchbase response status most closely associated with the HTTP status code.-
Methods inherited from class com.couchbase.client.core.error.CouchbaseException
context, getMessage
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
HttpStatusCodeException
public HttpStatusCodeException(com.couchbase.client.core.deps.io.netty.handler.codec.http.HttpResponseStatus status, String content, Request<?> request, ErrorContext errorContext)
-
-
Method Detail
-
responseStatus
public ResponseStatus responseStatus()
Returns the Couchbase response status most closely associated with the HTTP status code.
-
httpStatusCode
public int httpStatusCode()
-
content
public String content()
HTTP response body as a String. Possibly empty, but never null.
-
couchbaseResponseStatus
public static ResponseStatus couchbaseResponseStatus(Throwable t)
-
-