Categories
Express Node.js

Send awesome structured error responses with Express

9 min read Jump links Introducing the ‘Problem Details for HTTP APIs’ specification Problem types and Problem details objects Example problem details response More details, clearer problems Breakdown of a problem details object How to send problem details responses with Express Define problem types and map them to JavaScript error classes Look up the problem details for an […]

Categories
Node.js Quick Tips Quick Tips

Don’t install body-parser – it’s already bundled with Express

< 1 min read

Categories
Node.js Quick Tips Quick Tips

Only use dotenv in development

< 1 min read

Categories
Express Node.js

How to create an error handler for your Express API

7 min read Jump links Getting errors to error handler middleware Creating an error handler Error handler concerns Error handler middleware function Error handler helper functions Applying the error handler middleware Example error response Next steps Getting errors to error handler middleware Creating an error handler Error handler concerns Error handler middleware function Error handler helper functions Applying […]

Categories
Node.js Quick Tips Quick Tips

Express uses finalhandler for the default error handler

< 1 min read