This status 418 today is reserved to "I’m a Teapot", but I’ll tell you a little bit about this process.
As already said this status is a joke, appeared on 04/01/1998, ie a joke "first of April", even Google used it:
However what remains to be said is that this status has been proposed to be removed, Mark Nottingham, IETF president (at the time, today I don’t know) requested the removal of this status from some languages and libraries in response to this, Shane Brunswick (a developer, for some reason stressed that at the time he was only 15 years old) created a website called https://save418.com/ ("Save 418 Movement"), in the proposal he cited some arguments in favor of maintaining the 418 status, but I believe that the one that most convinced people was this argument:
... It’s a Reminder that the underlying processes of Computers are still made by Humans.
Translated:
... It’s a reminder that the underlying processes of computers are still done by humans.
This has gone viral (at least among the public that is in the development area and participants of the Reddit) that caused the hashtag #save418
on social media.
With this the HTTP languages and libraries that intended to remove the status 418 have decided to keep it, not because it is useful or because it is applicable, it was only by the facts occurred before.
These events led Mark Nottingham to file a lawsuit to make the 418 a reserved status so that it is not replaced in the future by another use, which is basically for all these reasons that the status still exists.
Answering the question:
The use of this status can be considered as a valid return?
Validity is a matter of context, without any context and speaking only of HTTP can say yes, it is valid, but use for use has no sense, as well as use any other code without context.
Reinforcement saying that even being today a reserved code this does not mean that it will be useful to you, unless you want to play too (and find it prudent at the moment), for example, on the first of April in any specific HTTP error(s) (example 404) you would exchange for 418
(as long as it does not affect anyone using the service).
Long story short, has no real use, has a support of communities and people for historical motivations and some "appreciation" to remember that things are created by humans yet.
You don’t have to worry about solving this status, but also if you notice it on a request from another server that does, you know, it’s probably a prank and probably has a way around it or you’ve definitely fallen into the wrong place or done something wrong, to fall into such a joke.
I don’t think that its implementation should be done on a production server, because it was born from a joke of April 1st, but there is even RFC: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/418
– Daniel Mendes
@Danielmendes if I make an HTCPCP request for a kettle in production environment which I should use then?
– Bacco
it would not be valid to use this code when someone tries to do something that the server does not?
– Joannis