From 60ccfa5857d1fa7de51f48ce66a2e76204b081bf Mon Sep 17 00:00:00 2001 From: Dan Galdi Date: Tue, 5 Dec 2023 08:39:29 -0500 Subject: [PATCH 1/2] Handle missing meta (#75) --- .../model/user/dataset/irods/IrodsUserDatasetSession.java | 4 ++-- .../model/user/dataset/irods/MissingMetaException.java | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 Model/src/main/java/org/gusdb/wdk/model/user/dataset/irods/MissingMetaException.java diff --git a/Model/src/main/java/org/gusdb/wdk/model/user/dataset/irods/IrodsUserDatasetSession.java b/Model/src/main/java/org/gusdb/wdk/model/user/dataset/irods/IrodsUserDatasetSession.java index 4e204d29b..5c1336fea 100644 --- a/Model/src/main/java/org/gusdb/wdk/model/user/dataset/irods/IrodsUserDatasetSession.java +++ b/Model/src/main/java/org/gusdb/wdk/model/user/dataset/irods/IrodsUserDatasetSession.java @@ -206,7 +206,7 @@ public Map getUserDatasets(Long userId) try { out.put(dsId, collectionToDataset(dsId, userId, ds)); } - catch (BrokenDatasetException e) { + catch (BrokenDatasetException | MissingMetaException e) { // simply log error and omit broken dataset from list; should not be a fatal exception LOG.error("Found broken dataset [ID = " + dsId + "]", e); } @@ -777,7 +777,7 @@ static Supplier missingMeta( final ICatNode node, final String key ) { - return () -> new WdkModelException(String.format(MISSING_META, + return () -> new MissingMetaException(String.format(MISSING_META, node.getPath(), key)); } diff --git a/Model/src/main/java/org/gusdb/wdk/model/user/dataset/irods/MissingMetaException.java b/Model/src/main/java/org/gusdb/wdk/model/user/dataset/irods/MissingMetaException.java new file mode 100644 index 000000000..33422c5c9 --- /dev/null +++ b/Model/src/main/java/org/gusdb/wdk/model/user/dataset/irods/MissingMetaException.java @@ -0,0 +1,8 @@ +package org.gusdb.wdk.model.user.dataset.irods; + +import org.gusdb.wdk.model.WdkModelException; + +public class MissingMetaException extends WdkModelException { + public MissingMetaException(String format) { + } +} From d2323532577f7b4486b0db420c4e6554d0c94504 Mon Sep 17 00:00:00 2001 From: Ryan Doherty Date: Thu, 14 Dec 2023 08:46:20 -0500 Subject: [PATCH 2/2] Remove incorrect documentation --- Service/doc/raml/includes/raml/record-types-api.raml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Service/doc/raml/includes/raml/record-types-api.raml b/Service/doc/raml/includes/raml/record-types-api.raml index 41ec2f8a7..37fa823bf 100644 --- a/Service/doc/raml/includes/raml/record-types-api.raml +++ b/Service/doc/raml/includes/raml/record-types-api.raml @@ -31,9 +31,7 @@ get: /records: post: description: > - (GET by POST) get the attributes and tables of a record instance. If - just the PK is supplied, gets all tables and attributes. Otherwise, - only get those that are explicitly specified. + (GET by POST) get the attributes and tables of a record instance queryParameters: source_id: project: