class BitfinexErrorAdapter {

  private BitfinexErrorAdapter() {}

  public static ExchangeException adapt(BitfinexException e) {<FILL_FUNCTION_BODY>}
}

    String message = e.getMessage();
    if (StringUtils.isEmpty(message)) {
      return new ExchangeException(e);
    }
    message = message.toLowerCase();
    if (message.contains("unknown symbol") || message.contains("symbol: invalid")) {
      return new CurrencyPairNotValidException(message, e);
    } else if (message.contains("not enough exchange balance")) {
      return new FundsExceededException(message, e);
    } else if (message.contains("err_rate_limit") || message.contains("ratelimit")) {
      return new RateLimitExceededException(e);
    } else if (message.contains("nonce")) {
      return new NonceException(e);
    }
    return new ExchangeException(message, e);
  
<no_super_class>