class BlockchainErrorAdapter {

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

    String message = e.getMessage();
    if (StringUtils.isEmpty(message)) {
      message = EXCEPTION_MESSAGE;
    }
    switch (e.getStatus()) {
      case 401:
        return new ExchangeSecurityException(message, e);
      case 404:
        return new RateLimitExceededException(message, e);
      case 500:
        return new InternalServerException(message, e);
      default:
        return new ExchangeException(message, e);
    }
  
<no_super_class>