public final class HttpStatusException extends RuntimeException
RuntimeException that is raised to send a simplistic HTTP response with minimal content
by a Service. It is a general exception raised by a failed request or a reset stream.HttpResponseException,
Serialized Form| Modifier and Type | Method and Description |
|---|---|
HttpStatus |
httpStatus()
Returns the
HttpStatus which would be sent back to the client who sent the
corresponding request. |
static HttpStatusException |
of(HttpStatus status)
Returns a new
HttpStatusException instance with the specified HttpStatus. |
static HttpStatusException |
of(HttpStatus status,
Throwable cause)
|
static HttpStatusException |
of(int statusCode)
Returns a new
HttpStatusException instance with the specified HTTP status code. |
static HttpStatusException |
of(int statusCode,
Throwable cause)
Returns a new
HttpStatusException instance with the specified HTTP status code and cause. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static HttpStatusException of(int statusCode)
HttpStatusException instance with the specified HTTP status code.public static HttpStatusException of(int statusCode, Throwable cause)
HttpStatusException instance with the specified HTTP status code and cause.public static HttpStatusException of(HttpStatus status)
HttpStatusException instance with the specified HttpStatus.public static HttpStatusException of(HttpStatus status, Throwable cause)
public HttpStatus httpStatus()
HttpStatus which would be sent back to the client who sent the
corresponding request.Copyright © 2020 LeanCloud. All rights reserved.