Class ResponseException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.onlinepayments.communication.ResponseException
All Implemented Interfaces:
Serializable

public class ResponseException extends RuntimeException
Thrown when a response was received from the Online Payments platform which indicates an error.
See Also:
  • Constructor Details

  • Method Details

    • getStatusCode

      public int getStatusCode()
      Returns:
      The HTTP status code that was returned by the Online Payments platform.
    • getBody

      public String getBody()
      Returns:
      The raw response body that was returned by the Online Payments platform.
    • getHeaders

      public List<ResponseHeader> getHeaders()
      Returns:
      The headers that were returned by the Online Payments platform. Never null.
    • getHeader

      public ResponseHeader getHeader(String headerName)
      Returns:
      The header with the given name, or null if there was no such header.
    • getHeaderValue

      public String getHeaderValue(String headerName)
      Returns:
      The value of the header with the given name, or null if there was no such header.
    • toString

      public String toString()
      Overrides:
      toString in class Throwable