I'm building a REST API and only need to send error codes from the server. Messages are being handled by the client. res.json(200); works. res.json(304); does not. 304 becomes the body with the status being changed to 200. res.json(304, {}); works.