Ah yes, who doesn't like descriptive error messages?

  • 10
    better then {status: "ok", message: "yea, no that didnt work"}
  • 6

    Oh yes, my favourite response from google dialogflow. Code 200. Response: { aLotOfCrap: 'yes', status: 'go to hell' }
  • 0
    In JS and TS projects I care less about descriptive errors and more about uniqueness. For example if someone wrote the error “mackerel_fish” I can find it in the code easily because what are the chances of another similarly named error. It is searchable. If they call the error “x” I lose my cool.
  • 1
    @C0D4 ikr. Love it when an API return 200 "Failed to create resource"
  • 1

    Unfortunately this was a message from an API.
  • 2
    @msdsk Oh you think this is bad you should see how Microsoft Dynamics API works. Everything is a post request that returns a 200. If a query isn’t successful there is a boolean flag included in the json response. You may get a bunch of the data but the flag is false you have no idea why it partially retrieved records.
  • 3
    @Hazarthim I'm used to dealing with apis that don't use header status codes correctly, soap is great for that.

    But there is generally a {status: true/false} or similar to work with.

    But when that flag gives false messages and you're relying on error messages, that's where I cringe working with these systems.
  • 0
    @norboerg ganna start doing this to you 😂😂 seeing as nobody appreciates my validation messages!! (Hope I got the tag right!)
  • 0
    @msdsk would be better if it was 302 with location hell
Add Comment