Class SolidClientException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BadRequestException, ConflictException, ForbiddenException, GoneException, InternalServerErrorException, MethodNotAllowedException, NotAcceptableException, NotFoundException, PreconditionFailedException, TooManyRequestsException, UnauthorizedException, UnsupportedMediaTypeException

public class SolidClientException extends InruptClientException
A runtime exception for use with SolidClient HTTP operations.
See Also:
  • Constructor Details

    • SolidClientException

      public SolidClientException(String message, URI uri, int statusCode, Headers headers, String body)
      Create a SolidClient exception.
      Parameters:
      message - the message
      uri - the uri
      statusCode - the HTTP status code
      headers - the response headers
      body - the body
  • Method Details

    • getUri

      public URI getUri()
      Retrieve the URI associated with this exception.
      Returns:
      the uri
    • getStatusCode

      public int getStatusCode()
      Retrieve the status code associated with this exception.
      Returns:
      the status code
    • getHeaders

      public Headers getHeaders()
      Retrieve the headers associated with this exception.
      Returns:
      the headers
    • getBody

      public String getBody()
      Retrieve the body associated with this exception.
      Returns:
      the body
    • getProblemDetails

      public ProblemDetails getProblemDetails()
      Retrieve the ProblemDetails instance describing the HTTP error response.
      Returns:
      the problem details object
    • handle

      public static SolidClientException handle(String message, URI uri, int statusCode, Headers headers, String body)
      Parameters:
      message - the resulting exception message
      uri - the request URL
      statusCode - the response status code
      headers - the response Headers
      body - the response body
      Returns:
      an appropriate exception based on the status code.