private void handleSQLException(SQLException e) throws AccountServiceException {
    // record failure, parse exception to figure out what we did wrong (eg. id or name collision). If it is id collision,
    // retry with incrementing ID (Account ID generation logic is currently in nuage-ambry, we might need to move it here)
    accountServiceMetrics.updateAccountErrorCount.inc();
    AccountServiceException ase = translateSQLException(e);
    if (ase.getErrorCode() == AccountServiceErrorCode.ResourceConflict) {
      needRefresh = true;
    }
    throw ase;
  }
Handle a {@link SQLException} and throw the corresponding {@link AccountServiceException}.
@param e the input exception.
@throws AccountServiceException the translated {@link AccountServiceException}.
ambry-account/src/main/java/com/github/ambry/account/CachedAccountService.java