cm0002@lemmy.world to Programmer Humor@programming.dev · 4 days agoYes, But...imagemessage-square30fedilinkarrow-up1524arrow-down17
arrow-up1517arrow-down1imageYes, But...cm0002@lemmy.world to Programmer Humor@programming.dev · 4 days agomessage-square30fedilink
minus-squaremadcaesar@lemmy.worldlinkfedilinkarrow-up11arrow-down1·3 days 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-up11·3 days 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-up5·3 days 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.