News for hackers. Stuff that matters.
Re:I've been abusing HTTP Status Codes in my APIs for years by that_james on Wednesday July 13, 2022 @08:44AM (#32081822)
That's a very good point.

It's also why I raised the issue of where your "server boundary" is. I dunno how else to phrase it, but what I mean is the separation of domain logic and technical logic.

In my understanding, 400 denotes an HTTP request that doesn't comply with the RFC (missing headers, bad format etc) but I also don't disagree with what you're saying, because the user did send a bad request.

Of course, you could always do both :) Send the opinionated payload with a 400 error.

As long as your consumer can reason about what went wrong, then I guess that's in line with the objective I was trying to get across.

Re:I've been abusing HTTP Status Codes in my APIs for years by zinekeller on Wednesday July 13, 2022 @08:47AM (#32081844)
Fair enough (and that's why edited the post to state that the document isn't clear about the intent of code 400). Just don't send the default servers' 4xx error, that'll confuse everyone where it went wrong.