Categories
JavaScript Answers

How to send a custom HTTP status message in Node Express?

Spread the love

To send a custom HTTP status message in Node Express, we call send with the message.

For instance, we write

res.status(400).send('Current password does not match');

to call send with the status message after call status to send the response with code 400.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *