Better than a 200 JSON reply containing the 4xx. "Aay it worked!" "oh."
129 0 ReplyWorked at a company where the previous devs had implemented their own frameworks for front and backend. Obviously 200 was the only possible code.
55 0 ReplyNot even 418?! Uncultured swine.
10 0 Reply
This legitimately happened to me a few months ago. A vendor API was returning HTTP 200 with the error details embedded in the JSON response. It was a pain in the ass to troubleshoot.
34 0 ReplyYeah, had that happen a few years ago, thankfully there was a consistent status attributes in the response that I could use but still, annoying
2 0 ReplyI guess I might be evil but when I made APIs for my projects I do this, since I blindly accept the response then look at the JSON to see if it was accepted or not
Something like
if (body_has(JSON)) do_stuff_with(JSON) // including error handling if the response has an error else error_no_json()
I do this since I feel like JSON errors should be separate from HTTP errors
2 0 ReplyNot even 418?! Uncultured swine.
1 1 Reply
“Task failed successfully”
25 0 Replywhat the fuck
13 0 ReplyI've had this so often... very frustrating.
I like to think the 400 within a 200 is for "look, I managed to reply to you. But there is bad news"
8 0 ReplyYou can give a 400 response a body though. It doesn't stop you from replying.
7 0 Replyregardless, its a big red flag for a poorly designed api
6 0 Reply
The sad reality is that when you look at the files being requested, it's usually scrapers looking for exploits.
51 0 ReplyYou can't have bugs if it's always the caller fault
44 0 Replycan't have a website problem if every page is 404 taps forehead
42 0 ReplyDeleting all the S3 buckets on my way to the exit interview
24 0 Replyreleases a change where all routes accidentally go to the error page controller
🤷♂️ They're 4xx errors, won't be us
20 0 ReplyAll 418 error codes. We good.
18 0 ReplyIt's all teapots all the way down.
5 0 Reply
if (request.ip != myip) return ErrorCodes.NotFound
And an ipv6 version for all you up 6 fans
if (request.ipv6 != myipv6) return ErrorCodes.NotFound
12 0 Reply3** status codes: 4000%
Oops
9 0 Replya pretty grafana dashboard? peak web traffic looks a lot nicer than i thought!
7 0 ReplyAlternatively all 504 Gateway Timeout
4 0 Reply"Not my problem" code
2 0 Reply