Hacker News new | ask | show | jobs
by Dilettante_ 344 days ago
Each of those should have a clear, unique response code. There should be no "maybe it's this, maybe it's that". A real-world example is login forms that tell you something like "Invalid e-mail or password".

Are you joking around with me or is my point just not as obvious as I believed it to be?

Edit: Not sure if that last bit sounds confrontational, please know that it's a genuine question.

1 comments

So we've gone down a bit of a path here, and thats cool :-)

Thank you for taking the time to respond and ask. My original 418 message was very much intended as a light hearted joke, in the spirit of "if we wanted to return cheeky responses to previously nonsense APIs that AI invented" I actually like this idea of subverting AI in inventive ways.

Now to the point where we've got here, yes I 100% agree in real-world, production applications, you should return response codes which accurately represent the actual response. But there also a place for fun, even in production, and 418 represents that for me.

Thanks for caring about quality :-)