-
Notifications
You must be signed in to change notification settings - Fork 882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: issue130 Return a 404 error while adding a pet to an unexisting owner #138
Conversation
Okay, finally this build was successful :) |
Hi @earlspilner
|
src/main/java/org/springframework/samples/petclinic/rest/advice/ExceptionControllerAdvice.java
Show resolved
Hide resolved
src/main/java/org/springframework/samples/petclinic/rest/advice/ExceptionControllerAdvice.java
Show resolved
Hide resolved
I hear you, but here’s the thing — sometimes the issue might not just be with the owner. It could be that neither the |
|
I’ve made the commit and everything’s ready for the merge. |
All it's ok. Thanks a lot. Feel free to contribute to any other petclinic project / issue. |
Improved handling of 404 errors for non-existing owners and pets in the
POST /owners/{ownerId}/pets
endpoint. Also switched to using records for error information to simplify and modernize the code.This PR addresses #130 and enhances both the error handling and the structure of the error responses.
Changes:
@arey, please review and merge this update.