cm0002@lemmy.world to Programmer Humor@programming.dev · 5 days agoYes, But...lemmy.mlimagemessage-square85fedilinkarrow-up1760arrow-down19
arrow-up1751arrow-down1imageYes, But...lemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 5 days agomessage-square85fedilink
minus-squarebountygiver [any]@lemmy.mllinkfedilinkEnglisharrow-up7·5 days agowhen you are too lazy to ask your request library to not throw exception on non-200 responses.
minus-squaredan@upvote.aulinkfedilinkarrow-up5·5 days agoThrowing exceptions is fine since errors are an exceptional circumstance (not expected during normal use of the app), and you probably want errors to follow a different code path so that they can be logged, alerts triggered if needed, etc.
when you are too lazy to ask your request library to not throw exception on non-200 responses.
Throwing exceptions is fine since errors are an exceptional circumstance (not expected during normal use of the app), and you probably want errors to follow a different code path so that they can be logged, alerts triggered if needed, etc.