Going through all of the tutorials of DietJS
here: Diet.js | Tutorials, I am not able to find a way to respond with a particular response code.
In the signals section, it is mentioned that we can use:
$.failure();
And we can put in more information about the failure through:
$.error("username", "missing");
But it responds with code 200 by default. There are no direct pointers towards setting up the desired response code.