Commit e128e476 authored by Kyle Muldoon's avatar Kyle Muldoon

updated error message for students not found

parent 7e93f55d
...@@ -34,7 +34,7 @@ public class StudentMarksController { ...@@ -34,7 +34,7 @@ public class StudentMarksController {
ResponseEntity<StudentMarks> findStudentMarksById(@PathVariable String id) throws ResourceNotFoundException { ResponseEntity<StudentMarks> findStudentMarksById(@PathVariable String id) throws ResourceNotFoundException {
StudentMarks sm = studentService.getStudentById(id). StudentMarks sm = studentService.getStudentById(id).
orElseThrow( () -> new ResourceNotFoundException("Student Marks not found... " + id)); orElseThrow( () -> new ResourceNotFoundException("Student was not found: " + id));
return ResponseEntity.ok(sm); return ResponseEntity.ok(sm);
} }
...@@ -45,7 +45,7 @@ public class StudentMarksController { ...@@ -45,7 +45,7 @@ public class StudentMarksController {
@DeleteMapping("remove/{id}") @DeleteMapping("remove/{id}")
ResponseEntity<String> deleteStudentMarkById(@PathVariable String id) throws ResourceNotFoundException{ ResponseEntity<String> deleteStudentMarkById(@PathVariable String id) throws ResourceNotFoundException{
StudentMarks sm = studentService.getStudentById(id). StudentMarks sm = studentService.getStudentById(id).
orElseThrow( () -> new ResourceNotFoundException("Student Marks not found... " + id)); orElseThrow( () -> new ResourceNotFoundException("Student was not found: " + id));
studentService.deleteStudent(sm); studentService.deleteStudent(sm);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment