@Override
  public Type classify(final Throwable e) {
    final Type type = SchemaRegistryUtil.isAuthErrorCode(e) ? Type.USER : Type.UNKNOWN;

    if (type == Type.USER) {
      LOG.info(
          "Classified error as USER error based on missing SR subject access rights. "
              + "Query ID: {} Exception: {}",
          queryId,
          e);
    }

    return type;
  }
@Test
  public void shouldClassifySRAuthenticationErrorCodeAsUserError() {
    // Given:
    final Exception e = new RestClientException("foo", 401, 403101);

    // When:
    final QueryError.Type type = new SchemaAuthorizationClassifier("").classify(e);

    // Then:
    assertThat(type, is(QueryError.Type.USER));
  }