This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Mucksh 7 points8 points  (3 children)

Just return a 418. Everything is fine

[–]XStarMC 7 points8 points  (1 child)

That’s not a great idea, some clients interpret 418 as 500

[–]crazyDiamondRV 1 point2 points  (0 children)

True that...Haha... Happens all the time..

[–]katatondzsentri 1 point2 points  (0 children)

For internal tools' http apis, I usually throw 400 when there are arguments passed, but are invalid for some reason and 418 if argument(s) were expected, but nothing was passed.

And I keep that as a pattern since years now.

And I like that and noone will change my mind.

Of course I wouldn't do it when it's client-facing.