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
-
They just check the success Boolean, and use their own message, no way to ever find out.
-
@Ranchonyx Tbh I learned a lot with writing my own Webserver from scratch back then.
It was in Java and even had a custom plugin system similar to bukkit.
My own defence for the blunder above was that I probably didn't even know the term "REST".
The frontend used a framework that isn't that popular anymore called "Vanilla JS" ( http://vanilla-js.com/ ). 😁 Not even jQuery. -
@bananaerror @lopu The fact that the API returns a 200 OK but is actually an error (success: false).
I watched the linked Video a bunch and found it pretty funny. Then I discovered that I did one of the things they mock about. -
@lopu I don't think so. REST tries to make access to data more standardized. Since a lot of HTTP Methods are used for certain actions I couldn't imagine why e.g. a faulty fetch shouln't return a 200 OK. Especially since I don't know of a "standardized JSON key" for marking an error instead of using the already existing Status Codes.
Related Rants
A Rant about my past self!
I thought I never did this shit myself! While restoring a old game server with it's various plugins and infra, I found this randomly.
It was for a Admin Panel that was never used in anything commercial. And I think no one ever saw this reponse anyway since I built the frontend that used it as well.
I'm still embarrassed that 16yo me did this exact thing, I think is just plain stupid today.
https://youtu.be/nSKp2StlS6s
rant
js
error200
bad design
web
200ok