Class ShipEngineApiException

  • All Implemented Interfaces:
    Serializable

    public class ShipEngineApiException
    extends org.springframework.web.reactive.function.client.WebClientException
    An exception that happens during communication with the ShipEngine API.
    Author:
    Cade Rea (cade-rea)
    See Also:
    Serialized Form
    • Constructor Detail

      • ShipEngineApiException

        public ShipEngineApiException​(String msg,
                                      org.springframework.http.HttpStatus status,
                                      ShipEngineApiErrorWrapper shipEngineApiErrorWrapper)
      • ShipEngineApiException

        public ShipEngineApiException​(org.springframework.http.HttpStatus status,
                                      ShipEngineApiErrorWrapper shipEngineApiErrorWrapper)
      • ShipEngineApiException

        public ShipEngineApiException​(Throwable ex,
                                      org.springframework.http.HttpStatus status,
                                      ShipEngineApiErrorWrapper shipEngineApiErrorWrapper)
    • Method Detail

      • getMessage

        public String getMessage()
        Use the errors from the API response as the message.
        Overrides:
        getMessage in class org.springframework.core.NestedRuntimeException
        Returns:
        A joined String of all error messages from the ShipEngineApiErrorWrapper.
      • getStatus

        public org.springframework.http.HttpStatus getStatus()