Class InfluxException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BadGatewayException, BadRequestException, FluxCsvParserException, FluxQueryException, ForbiddenException, GatewayTimeoutException, InternalServerErrorException, MethodNotAllowedException, NotAcceptableException, NotFoundException, NotImplementedException, PaymentRequiredException, ProxyAuthenticationRequiredException, RequestEntityTooLargeException, RequestTimeoutException, ServiceUnavailableException, UnauthorizedException, UnprocessableEntityException

public class InfluxException extends RuntimeException
The base type for Influx errors.
Author:
Jakub Bednar (bednar@github) (31/07/2018 11:53)
See Also:
  • Constructor Details

    • InfluxException

      public InfluxException(@Nullable String message)
    • InfluxException

      public InfluxException(@Nullable Throwable cause)
    • InfluxException

      public InfluxException(@Nullable retrofit2.Response<?> cause)
  • Method Details

    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • reference

      public int reference()
      Gets the reference code unique to the error type. If the reference code is not present then return "0".
      Returns:
      reference code unique to the error type
    • status

      public int status()
      Gets the HTTP status code of the unsuccessful response. If the response is not present then return "0".
      Returns:
      HTTP status code
    • headers

      @Nonnull public Map<String,String> headers()
      Gets the HTTP headers from the unsuccessful response. If the response is not present then return empty Map.
      Returns:
      HTTP headers
    • errorBody

      @Nonnull public Map<String,Object> errorBody()
      The JSON unsuccessful response body.
      Returns:
      a response body