public static ErrorResponse fromJson(int code, String json) {
    return JsonUtil.parse(json, node -> OAuthErrorResponseParser.fromJson(code, node));
  }
@Test
  public void testOAuthErrorResponseFromJsonMissingError() {
    String description = "Credentials given were invalid";
    String uri = "http://iceberg.apache.org";
    String json =
        String.format("{\"error_description\":\"%s\",\"error_uri\":\"%s\"}", description, uri);
    assertThatThrownBy(() -> OAuthErrorResponseParser.fromJson(400, json))
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Cannot parse missing string: error");
  }