spring-guides / getting-started-guides

Getting Started Guide template :: The template for new guides and also the place to request them.
https://github.com/spring-guides/getting-started-guides/wiki
Apache License 2.0
518 stars 204 forks source link

Complete Building REST services with Spring tutorial with OrderNotFoundAdvice Class #144

Closed oulanbator closed 2 years ago

oulanbator commented 2 years ago

It may not be really relevant for "oppening an issue", but since the last part of the tutorial intends to put all together the Order associated classes, in the same way that we built the Employee classes (in order to build a "real" RESTful service), i felt like something was missing here : the OrderNotFoundAdvice Class. Indeed, as we left our code at the end of the tutorial, a bad request on orders (i.e. curl -v localhost:8080/orders/5) send back a 500 error (internal server error) instead of the 404 we should expect. It is probably just a small piece of code, and almost no explanations to add in the tutorial as the benefits are already explained earlier, when building the Employee classes. It's my first contribution to a project on Github so I don't really know how to help more from here, but I could easily write the missing paragraph if needed.

oulanbator commented 2 years ago

Closed because I realized that I was not in the good repo ! :)