Class InvalidRequestException

All Implemented Interfaces:
Serializable

public final class InvalidRequestException extends GeoIp2Exception
This class represents a non-specific error returned by MaxMind's GeoIP2 web service. This occurs when the web service is up and responding to requests, but the request sent was invalid in some way.
See Also:
  • Constructor Details

    • InvalidRequestException

      public InvalidRequestException(String message, String code, URI uri)
      Parameters:
      message - A message explaining the cause of the error.
      code - The error code returned by the web service.
      uri - The URI queried.
    • InvalidRequestException

      public InvalidRequestException(String message, String code, int httpStatus, URI uri, Throwable e)
      Parameters:
      message - A message explaining the cause of the error.
      code - The error code returned by the web service.
      httpStatus - The HTTP status of the response.
      uri - The URI queried.
      e - The cause of the exception.
  • Method Details

    • code

      public String code()
      Returns:
      The error code returned by the MaxMind web service.
    • getCode

      @Deprecated(since="5.0.0", forRemoval=true) public String getCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use code() instead. This method will be removed in 6.0.0.
      Returns:
      The error code returned by the MaxMind web service.
    • uri

      public URI uri()
      Returns:
      the URI queried.
    • getUri

      @Deprecated(since="5.0.0", forRemoval=true) public URI getUri()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use uri() instead. This method will be removed in 6.0.0.
      Returns:
      the URI queried.