Home / Function/ error() — express Function Reference

error() — express Function Reference

Architecture documentation for the error() function in index.js from the express codebase.

Entity Profile

Dependency Diagram

graph TD
  bb54eeca_e310_09dd_6bc1_8347ad4723c6["error()"]
  92a69000_b663_c758_e294_3515ae2cfce4["index.js"]
  bb54eeca_e310_09dd_6bc1_8347ad4723c6 -->|defined in| 92a69000_b663_c758_e294_3515ae2cfce4
  style bb54eeca_e310_09dd_6bc1_8347ad4723c6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

examples/error/index.js lines 20–27

function error(err, req, res, next) {
  // log it
  if (!test) console.error(err.stack);

  // respond with 500 "Internal Server Error".
  res.status(500);
  res.send('Internal Server Error');
}

Domain

Subdomains

Frequently Asked Questions

What does error() do?
error() is a function in the express codebase, defined in examples/error/index.js.
Where is error() defined?
error() is defined in examples/error/index.js at line 20.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free