Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add logging when error on request feature #117

Merged
merged 1 commit into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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