MCPcopy Create free account
hub / github.com/dhatGuy/PERN-Store / constructor

Method constructor

server/helpers/error.js:3–8  ·  view source on GitHub ↗
(statusCode, message)

Source from the content-addressed store, hash-verified

1const { logger } = require("../utils/logger");
2class ErrorHandler extends Error {
3 constructor(statusCode, message) {
4 super();
5 this.status = "error";
6 this.statusCode = statusCode;
7 this.message = message;
8 }
9}
10
11const handleError = (err, req, res, next) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected