r/SpringBoot • • Feb 07 '26

Question Error responses for REST API

Do you implement RFC 9457 in your error responses? I saw that Spring provides an abstraction for this with ProblemDetail, it looks good but not many people are using it.

12 Upvotes

15 comments sorted by

View all comments

Show parent comment

1

u/j0k3r_dev Feb 08 '26 edited Feb 08 '26

There are standards that must be used and others that can be ignored. Overanalyzing engineering isn't good; everyone should adapt what they need. Using handlers in Spring is very simple, so why complicate it? Why would anyone decide to write 20,000 lines of code to do the same thing with 5?

Edit: There's also documentation available in case another developer wants to modify the code in the future.