cm0002@lemmy.world to Programmer Humor@programming.dev · 2 years agoYes, But...lemmy.mlimagemessage-square45fedilinkarrow-up1673arrow-down18
arrow-up1665arrow-down1imageYes, But...lemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 2 years agomessage-square45fedilink
minus-squaremadcaesar@lemmy.worldlinkfedilinkarrow-up13arrow-down2·2 years agoHere I am preferring 200, with success boolean / message string… Iike HTTP errors codes for real fuck up’s, if I see 500 somethings fucked in the app, otherwise a standardised json response body seems way easier
minus-squarefuzzzerd@programming.devlinkfedilinkEnglisharrow-up19·2 years agoWhat about both? User supplies bad input? HTTP 400 with response body json describing the error in a standard format?
minus-squarebountygiver [any]@lemmy.mllinkfedilinkEnglisharrow-up6·2 years agowhen you are too lazy to ask your request library to not throw exception on non-200 responses.
Here I am preferring 200, with success boolean / message string…
Iike HTTP errors codes for real fuck up’s, if I see 500 somethings fucked in the app, otherwise a standardised json response body seems way easier
What about both? User supplies bad input? HTTP 400 with response body json describing the error in a standard format?
when you are too lazy to ask your request library to not throw exception on non-200 responses.