class ApiErrorExtractor {

  public boolean accessDeniedNonRecoverable(IOException e) {
    ErrorInfo errorInfo = getErrorInfo(e);
    String reason = errorInfo != null ? errorInfo.getReason() : null;
    return ACCOUNT_DISABLED_REASON.equals(reason) || ACCESS_NOT_CONFIGURED_REASON.equals(reason);
  }

}