PAN-50 Addressed Brittany's comment about nonexistent fields

This commit is contained in:
2019-03-13 22:24:32 -06:00
parent d19cb5a989
commit 3483a2dd2c
2 changed files with 35 additions and 0 deletions
@@ -62,6 +62,12 @@ public class TheoremController {
LOG.debug("Received response from server: query took " + stopWatch.getTotalTimeMillis() + "ms to complete");
LOG.info("Returning list of all theorems with size " + listOfTheorems.size());
if (listOfTheorems.isEmpty()) {
LOG.warn("No theorems were found for branch {}", branch);
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
}
LOG.info("Returning list of theorems with branch {}", branch);
return new ResponseEntity<>(listOfTheorems, HttpStatus.OK);
}
@@ -86,6 +92,12 @@ public class TheoremController {
LOG.debug("Received response from server: query took " + stopWatch.getTotalTimeMillis() + "ms to complete");
LOG.info("Returning list of all theorems with size " + listOfTheorems.size());
if (listOfTheorems.isEmpty()) {
LOG.warn("No theorems were found for proven status {}", provenStatus);
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
}
LOG.info("Returning list of theorems with proven status {}", provenStatus);
return new ResponseEntity<>(listOfTheorems, HttpStatus.OK);
}