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
-
My reply would be "Change your system then, not gonna break it for everyone else"
-
Brolls31157yI’ve had this before, the whole “everything must return 200, or our system automatically elevates it to a full on panic-mode error; just send us a 200 response with an error field instead” *bangs head*
-
Root797737y@Brolls
The contractor dev at work (the only other dev...) insists on this. It drives me crazy!
Though he had any okay reason: the previous dev would say APIs were finished, but in reality hadn't even started, so 404s could indicate either a missing record or a missing API. I can see that getting very infuriating very quickly. -
Brolls31157y@Root yeah, the missing endpoint vs missing resource is a tricky one to solve; though I suppose the REST standard takes the position that as urls should map to resources, it’s essentially the same error (though not really).
-
Root797737y@Brolls Yeah. But professionalism and documentation solve that 😋. Also my preferred method of adding a /help to the end of the API URLs that document them. If the help isn't present, the endpoint isn't either.
E.g. /api/v4/gift/help shows data about that endpoint and all child endpoints.
/api/v4/help therefore would list documentation about all v4 APIs.
(I may start using/docs instead.) -
Root797736y@k0pernikus That works as well 😊
But the route would only return that if I've already begun working on the api. If I haven't, it'd still 404.
Related Rants
Client "Can you change your API? If a POST return 201 ours system crashes reading it"
Me "Your system WHAT?????"
rant
rest api
post
api