Skip to content

Commit

Permalink
fix(rest): Update search API to return 200 status with empty results …
Browse files Browse the repository at this point in the history
…array when no match found

Signed-off-by: sameed.ahmad <sameed.ahmad@siemens-healthineers.com>
  • Loading branch information
sameed20 committed May 17, 2024
1 parent e71c5e5 commit ccadca8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ public ResponseEntity<CollectionModel<EntityModel<SearchResult>>> getSearchResul
CollectionModel resources = null;
if (CommonUtils.isNotEmpty(searchResources)) {
resources = restControllerHelper.generatePagesResource(paginationResult, searchResources);
}else{
resources = restControllerHelper.emptyPageResource(SearchResult.class, paginationResult);
}

HttpStatus status = resources == null ? HttpStatus.NO_CONTENT : HttpStatus.OK;
Expand Down

0 comments on commit ccadca8

Please sign in to comment.