top | item 41968884

(no title)

mrmincent | 1 year ago

I hate to be that guy, but just a reminder that if you’re implementing a production system - even if it’s an internal tool - please don’t return 418 as a joke unless you really are a teapot. As an SRE I’ve been on the receiving end of a broken system returning teapots over the weekend, and it’s not as funny then.

discuss

order

cybrox|1 year ago

Well, statistically, 9 out of 10 engineers find this very funny come Monday.

seanthemon|1 year ago

I did this many years ago on the app I still work on, the product became much more enterprise and eventually customers started to see 418 errors.. it wasn't a good look and I felt great shame.

nurettin|1 year ago

I handle all these special cases like 2xx_other, 3xx_other, 4xx_other and 5xx_other. I log the http code and the response in case I have to debug later. 4xx_other just means you shouldn't repeat the request, since the server thinks it is invalid.

sleepyhead|1 year ago

I don't get it. If the system is so broken it is returning some random http code then I don't see how returning some other random http code is better?

dtech|1 year ago

5xx indicates an error in the server, 4xx indicates a client error. So it's quite common for clients to handle them differently like retrying 5xx but not 4xx.

fastball|1 year ago

We return 418s for captcha failures.

mikepurvis|1 year ago

Surely that should be a 401 unauthorized?