Conversation
…-ironschool into kenan-revan-dev
| @ExceptionHandler(Exception.class) | ||
| public ResponseEntity<String> handleGenericException(Exception ex) { | ||
| return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) | ||
| .body("An unexpected error occurred: " + ex.getMessage()); |
There was a problem hiding this comment.
It's a super specific comment but considering your good project submission here it goes:
Since this is a catch-all exception handler, I’d avoid returning whatever comes from getMessage() to the client.
It can still leak internal details like DB messages, file paths, or implementation-specific errors. A generic message for the response plus proper server-side logging would be safer. Something like: "An unexpected error occurred".
Added with a logging of the error, obviously, but this part is just informative. Not to implement.
There was a problem hiding this comment.
Thanks for pointing that out! We missed it this time, but we'll make sure to pay closer attention from now on.
|
You decided to not have patch mappings. Right? |
You’re right! We actually split the workload between us, and since we hadn't implemented PATCH logic yet, we focused on customizing our PUT methods. This allowed us to achieve the same result for partial updates while keeping our workflow moving forward during the development phase. |
No description provided.