@@ -66,7 +66,7 @@ public CompletableFuture<ResponseEntity<String>> getUserSettings(@PathVariable("
6666 return dbService .getUserSettings (userId )
6767 .thenApply (optionalSettings -> optionalSettings
6868 .map (ResponseEntity ::ok )
69- .orElseThrow (() -> new ResourceNotFoundException ("User settings not found for userId: " + userId )));
69+ .orElseThrow (() -> new NotFoundException ("User settings not found for userId: " + userId )));
7070 }
7171
7272 @ GetMapping ("/users/{userId}/applications" )
@@ -75,7 +75,7 @@ public CompletableFuture<ResponseEntity<List<Map<String, Object>>>> getApplicati
7575 return dbService .getApplications (userId )
7676 .thenApply (applications -> {
7777 if (applications .isEmpty ()) {
78- throw new ResourceNotFoundException ("Applications not found for userId: " + userId );
78+ throw new NotFoundException ("Applications not found for userId: " + userId );
7979 }
8080 return ResponseEntity .ok (applications );
8181 });
@@ -86,27 +86,27 @@ public CompletableFuture<ResponseEntity<String>> getApplicationStatus(@PathVaria
8686 logger .debug ("Getting application status for id: {}" , applicationId );
8787
8888 if (applicationId <= 0 ) {
89- throw new ResourceNotFoundException ("Invalid applicationId: " + applicationId );
89+ throw new NotFoundException ("Invalid applicationId: " + applicationId );
9090 }
9191
9292 return dbService .getApplicationStatus (applicationId )
9393 .thenApply (optionalStatus -> optionalStatus
9494 .map (ResponseEntity ::ok )
95- .orElseThrow (() -> new ResourceNotFoundException ("Application not found for applicationId: " + applicationId )));
95+ .orElseThrow (() -> new NotFoundException ("Application not found for applicationId: " + applicationId )));
9696 }
9797
9898 @ GetMapping ("/applications/{applicationId}/results" )
9999 public CompletableFuture <ResponseEntity <List <Map <String , Object >>>> getResults (@ PathVariable ("applicationId" ) int applicationId ) {
100100 logger .debug ("Getting results for applicationId: {}" , applicationId );
101101
102102 if (applicationId <= 0 ) {
103- throw new ResourceNotFoundException ("Invalid applicationId: " + applicationId );
103+ throw new NotFoundException ("Invalid applicationId: " + applicationId );
104104 }
105105
106106 return dbService .getResults (applicationId )
107107 .thenApply (results -> {
108108 if (results .isEmpty ()) {
109- throw new ResourceNotFoundException ("Results not found for applicationId: " + applicationId );
109+ throw new NotFoundException ("Results not found for applicationId: " + applicationId );
110110 }
111111 return ResponseEntity .ok (results );
112112 });
0 commit comments