10
A-C-E
6y

all documentation points to an Invalid auth token being code 400 (ignore the fact that this is a code in the JSON response and not HTTP)

Me: here iz credential. Plz send datas
API: haha fock off and die mate, then credentials you got there aren’t workin’
API: code 998 invalid auth token
Me: *speechless* so that’s why it took me longer than it did to find that error, because YOUR CODE WAS MISSING ALL MY CHECKS FOR CODE 400.

Why can’t people design apis properly.

Comments
  • 2
    Experiences like this teach you very important lessons
    1 - Documentation goes stale. Code/behaviour never lies.
    2 - Never trust anything you didn't write yourself. Even then take it with a pinch of salt.

    I've had similar experiences, and they are why I always take documentation as an indication of what a thing might do, rather than gospel truth xD. For REST APIs, always test behaviour with postman or similar before implementing!
  • 0
    @Zaphod65 yep, I have been.
    While I don’t directly have access to the api, I know someone who does so I can nudge things in the right direction
Add Comment