Class APICommunicationException

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    APINotAuthorizedException

    public class APICommunicationException
    extends APIException
    Exception indicating problems while communicating with the remote API. This includes general IO issues as well as checked communication level errors returned by the API as declared in the interface description.


    The only checked response error that is not covered by this exception is HTTP-401 which is handled by a more distinctive exception type: APINotAuthorizedException

    See Also:
    Serialized Form
    • Constructor Detail

      • APICommunicationException

        public APICommunicationException​(String message)
        Creates a new API communication exception with the given error message
        Parameters:
        message - Brief error message describing the problem
      • APICommunicationException

        public APICommunicationException​(@Nonnull
                                         String message,
                                         @Nonnull
                                         String details)
        Creates a new API communication exception with an extended error message
        Parameters:
        message - Brief error message describing the problem. This message may contain a single %s conversion which will be automatically replaced with the given details message text.
        details - A more detailed error description
      • APICommunicationException

        public APICommunicationException​(String message,
                                         Throwable cause)
        Creates a nested API communication exception wrapping some other root exception
        Parameters:
        message - Brief error message describing the problem
        cause - The original root exception