Class ResourceNotFoundException

All Implemented Interfaces:
Serializable

public class ResourceNotFoundException extends HttpResponseException

The ResourceNotFoundException represents an exception thrown when an HTTP request attempts to access a resource that does not exist.

This exception is typically thrown when the service responds with a status code of 4XX, typically 404 Not Found.

This class also provides methods to get the HttpResponse that was received when the exception occurred and the deserialized HTTP response value.

See Also:
  • Constructor Details

    • ResourceNotFoundException

      public ResourceNotFoundException(String message, HttpResponse response)
      Initializes a new instance of the ResourceNotFoundException class.
      Parameters:
      message - the exception message or the response content if a message is not available
      response - the HTTP response
    • ResourceNotFoundException

      public ResourceNotFoundException(String message, HttpResponse response, Object value)
      Initializes a new instance of the ResourceNotFoundException class.
      Parameters:
      message - the exception message or the response content if a message is not available
      response - the HTTP response
      value - the deserialized response value
    • ResourceNotFoundException

      public ResourceNotFoundException(String message, HttpResponse response, Throwable cause)
      Initializes a new instance of the ResourceNotFoundException class.
      Parameters:
      message - the exception message or the response content if a message is not available
      response - the HTTP response
      cause - the Throwable which caused the creation of this ResourceNotFoundException