Last modified: 2023-12-04

Java SDK

When the SDK encounters a problem, it throws one of the following exception types:

  • EslException: This is a general exception. It includes a character string that indicates what failed.
  • EslServerException: This is a subclass of EslException. An EslServerException is thrown when the server returns unexpected code from a request. The EslServerException also contains the exact server response from the underlying API request.

The following code samples illustrate: (1) how to differentiate between those two exception types; (2) how to gain access to the underlying server response if an EslServerException is thrown:

Was this information helpful?