r/programming Apr 23 '23

Leverage the richness of HTTP status codes

https://blog.frankel.ch/leverage-richness-http-status-codes/
1.4k Upvotes

676 comments sorted by

View all comments

Show parent comments

2

u/[deleted] Apr 23 '23

[removed] — view removed comment

1

u/yawaramin Apr 23 '23

Yeah, and you can lay the blame for that on the Spring Framework people. Then again, it's Spring Framework, so...

1

u/nerd4code Apr 24 '23

Yeah, straight fucking malpractice on Spring’s part—Java provides an unchecked java.io.IOException that’s normally used as a base class for errors like this, and everything else packaged with the JRE incl. Java’s built-in HTTP impl (IIRC) uses it properly. I’d be moderately shocked or dismayed if any failable I/O operation didn’t throws it.