Skip to content

Commit

Permalink
Merge changes from 'integration' (404 fix) into rel/1.0.X
Browse files Browse the repository at this point in the history
  • Loading branch information
RayPlante committed Oct 26, 2018
2 parents fd47ca4 + 56b3e52 commit 14db45d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.mongodb.client.model.Filters;

import gov.nist.oar.rmm.config.MongoConfig;
import gov.nist.oar.rmm.exceptions.ResourceNotFoundException;
import gov.nist.oar.rmm.repositories.CustomRepository;
import gov.nist.oar.rmm.utilities.ProcessRequest;

Expand Down Expand Up @@ -113,7 +114,8 @@ public Document findRecord(String ediid) {

long count = mcollection.count(Filters.eq("ediid",ediid));
if(count == 0) {
return new Document("Message", "No record available for given id.");
//return new Document("Message", "No record available for given id.");
throw new ResourceNotFoundException("No record available for given id.");
}
else
return mcollection.find(Filters.eq("ediid",ediid)).first();
Expand Down

0 comments on commit 14db45d

Please sign in to comment.