Skip to content

Commit

Permalink
return 404 if didn't find an uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
HavierD committed Sep 25, 2024
1 parent 702e51c commit 7b5c482
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public ResponseEntity<Collection> getCollection(String id, String sortBy) throws
return ResponseEntity.ok()
.body(StacToCollection.convert(model.getCollections().get(0)));
} else {
throw new NoSuchElementException(String.format("uuid %s not found!", id));
return ResponseEntity.notFound().build();
}
}
}

0 comments on commit 7b5c482

Please sign in to comment.