class CoingiErrorAdapter {
  public static ExchangeException adapt(CoingiException e) {<FILL_FUNCTION_BODY>}
}

    String message = e.getMessage();
    if (message == null || "".equals(message)) {
      return new ExchangeException("Operation failed without any error message");
    }

    if (message.contains("Invalid value for parameter \"currencyPair\"")) {
      return new CurrencyPairNotValidException(message);
    }

    return new ExchangeException(message);
  
<no_super_class>