Class FailedAPIResponse

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCode()
      The returned status code.
      @Nullable java.lang.String getMessage()
      A possible response message.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FailedAPIResponse

        public FailedAPIResponse()
      • FailedAPIResponse

        public FailedAPIResponse​(java.lang.String message)
    • Method Detail

      • getCode

        public int getCode()
        The returned status code.
        Anything that isn't a 2xx response should be counted as a failed request.
        Specified by:
        getCode in interface GenericAPIResponse
        Returns:
        Non-200 Response code from the API.
      • getMessage

        @Nullable
        public @Nullable java.lang.String getMessage()
        A possible response message. This is usually empty/null value for successful responses as usually only failed ones will have a message in it.
        Specified by:
        getMessage in interface GenericAPIResponse
        Returns:
        Message explaining why the request failed.