Skip to content

Commit

Permalink
add logging when error on request feature (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
pradithya authored and feast-ci-bot committed Jan 31, 2019
1 parent c920e67 commit d9cbd25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions core/src/main/java/feast/core/service/SpecService.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public List<EntityInfo> getEntities(List<String> ids) {
List<EntityInfo> entityInfos = this.entityInfoRepository.findAllById(dedupIds);
if (entityInfos.size() < dedupIds.size()) {
throw new RetrievalException(
"unable to retrieve all entities requested"); // TODO: check and return exactly which ones
"unable to retrieve all entities requested " + ids);
}
return entityInfos;
}
Expand Down Expand Up @@ -122,7 +122,7 @@ public List<FeatureInfo> getFeatures(List<String> ids) {
List<FeatureInfo> featureInfos = this.featureInfoRepository.findAllById(dedupIds);
if (featureInfos.size() < dedupIds.size()) {
throw new RetrievalException(
"unable to retrieve all features requested"); // TODO: check and return exactly which ones
"unable to retrieve all features requested: " + ids);
}
return featureInfos;
}
Expand Down Expand Up @@ -154,8 +154,7 @@ public List<FeatureGroupInfo> getFeatureGroups(List<String> ids) {
List<FeatureGroupInfo> featureGroupInfos = this.featureGroupInfoRepository.findAllById(dedupIds);
if (featureGroupInfos.size() < dedupIds.size()) {
throw new RetrievalException(
"unable to retrieve all feature groups requested"); // TODO: check and return exactly
// which ones
"unable to retrieve all feature groups requested " + dedupIds);
}
return featureGroupInfos;
}
Expand Down Expand Up @@ -187,7 +186,7 @@ public List<StorageInfo> getStorage(List<String> ids) {
List<StorageInfo> storageInfos = this.storageInfoRepository.findAllById(dedupIds);
if (storageInfos.size() < dedupIds.size()) {
throw new RetrievalException(
"unable to retrieve all storage requested"); // TODO: check and return exactly which ones
"unable to retrieve all storage requested: " + ids);
}
return storageInfos;
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/java/feast/core/service/SpecServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public void shouldThrowRetrievalExceptionIfAnyFeatureNotFound() {
featureGroupInfoRepository,
schemaManager);
exception.expect(RetrievalException.class);
exception.expectMessage("unable to retrieve all features requested");
exception.expectMessage("unable to retrieve all features requested: " + ids);
specService.getFeatures(ids);
}

Expand Down Expand Up @@ -304,7 +304,7 @@ public void shouldThrowRetrievalExceptionIfAnyStorageNotFound() {
schemaManager);

exception.expect(RetrievalException.class);
exception.expectMessage("unable to retrieve all storage requested");
exception.expectMessage("unable to retrieve all storage requested: " + ids);
specService.getStorage(ids);
}

Expand Down

0 comments on commit d9cbd25

Please sign in to comment.