code: public long getId(final String agent) {
          try {
              return worker.getId(agent);
          } catch (final InvalidUserAgentError e) {
              LOGGER.error("Invalid user agent ({})", agent);
              throw new SnowizardException(Response.Status.BAD_REQUEST,
                      "Invalid User-Agent header", e);
          } catch (final InvalidSystemClock e) {
              LOGGER.error("Invalid system clock", e);
              throw new SnowizardException(Response.Status.INTERNAL_SERVER_ERROR,
                      e.getMessage(), e);
          }
      }
docs: Get a new ID and handle any thrown exceptions
  
  @param agent
  User Agent
  @return generated ID
  @throws SnowizardException