MCPcopy Create free account
hub / github.com/BrasilAPI/BrasilAPI / constructor

Method constructor

errors/BaseError.js:2–15  ·  view source on GitHub ↗
({
    status = 500,
    name = 'BaseError',
    message,
    type = 'base_error',
    errors = [],
  })

Source from the content-addressed store, hash-verified

1export default class BaseError extends Error {
2 constructor({
3 status = 500,
4 name = 'BaseError',
5 message,
6 type = 'base_error',
7 errors = [],
8 }) {
9 super(message);
10
11 this.name = name;
12 this.status = status;
13 this.type = type;
14 this.errors = errors;
15 }
16}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected