Skip to content

Glossary: Building APIs with Node.js

HttpError

A small class that extends `Error` with a `statusCode`. When a handler throws one, Fastify replies with that status in the standard error shape.

Where the book teaches it

Related terms

Error shapeError handler