164

Client "Can you change your API? If a POST return 201 ours system crashes reading it"
Me "Your system WHAT?????"

Comments
  • 19
    Bahaha
  • 21
    My reply would be "Change your system then, not gonna break it for everyone else"
  • 13
    Ya filter is ip adresse and return {"message":"fuck you"}
  • 7
    I’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*
  • 3
    @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.
  • 3
    @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).
  • 1
    @Root I guess you can always add an error message to differentiate them
  • 3
    @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.)
  • 0
  • 1
    @Root nice! Using /help or /docs sounds like a good way to go
  • 1
    @Root What about 501 Not Implemented?
  • 0
    Holy shit. They have no competent dev OR QA.
  • 0
    @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.
Add Comment