Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@diobert I was being sarcastic but yeah, we don't know the context of the story 😄
-
mrrmc2266yHaha I had exactly that when I joined a new company.
This one's quite advanced though, it uses a boolean response for error and not a string "true" 😒 -
pain04861716y:@ our backend used to have this all the time. Instead of returning the correct result, it was stored in the object and the returning status code was 200. Drives you nuts when coding angular and error results keep taking the success path!
-
This fuckin happened to us today. A fuckin API that we were fuckin using in our fuckin application, fuckin did this fuckin blunder.
-
My previous n+1 did the same shit on a previous project. The reason was "I don't want to mix network errors and application errors".
After 20years, the guy didn't know that HTTP codes ARE application errors.
Another story with the guy : https://devrant.com/rants/1440059/... -
skynet45586yFound in the wild
Status: 200
Body: {"success": true, "message": "otp sent successfully to your number xxxxxxx", "otp": "1234"} -
Braed2966yThis is actually the recommended way of doing REST API responses. Twillio, Facebook and many others use this.
-
Braed2966y@AL1L because its easier for the api consumer to just support a handful of codes (200,400,401,404,500) than all of them.
It's a controversial topic... This is worth a read:
https://softwareengineering.stackexchange.com/...
Related Rants
Status code: 200
Content-Type: application/json
Body: {"error": true, "responseCode":400 }
rant
error
json
http
rest