-
- All Implemented Interfaces:
-
org.readium.r2.shared.util.Error,org.readium.r2.shared.util.data.AccessError
public final class HttpError.ErrorResponse extends HttpError
Server responded with an error status code.
-
-
Field Summary
Fields Modifier and Type Field Description private final ProblemDetailsproblemDetailsprivate final HttpStatusstatusprivate final MediaTypemediaTypeprivate final ByteArraybodyprivate final Stringmessageprivate final Errorcause
-
Constructor Summary
Constructors Constructor Description HttpError.ErrorResponse(HttpStatus status, MediaType mediaType, ByteArray body)
-
Method Summary
Modifier and Type Method Description final ProblemDetailsgetProblemDetails()Response body parsed as a JSON problem details. final HttpStatusgetStatus()final MediaTypegetMediaType()final ByteArraygetBody()StringgetMessage()An error message. ErrorgetCause()The cause error or null if there is none. -
-
Constructor Detail
-
HttpError.ErrorResponse
HttpError.ErrorResponse(HttpStatus status, MediaType mediaType, ByteArray body)
- Parameters:
status- HTTP status code.mediaType- Response media type.body- Response body.
-
-
Method Detail
-
getProblemDetails
final ProblemDetails getProblemDetails()
Response body parsed as a JSON problem details.
-
getStatus
final HttpStatus getStatus()
-
getMediaType
final MediaType getMediaType()
-
getMessage
String getMessage()
An error message.
-
-
-
-