@takeshape/errors 11.13.0 → 11.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@ export type BaseErrorExtensions = {
7
7
  };
8
8
  export type BaseErrorOptions = ErrorOptions & {
9
9
  extensions?: BaseErrorExtensions;
10
+ reportToSentry?: boolean;
10
11
  };
11
12
  export declare class BaseError extends Error {
12
13
  static code: string;
@@ -1 +1 @@
1
- {"version":3,"file":"base-error.d.ts","sourceRoot":"","sources":["../../src/base-error.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAC,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG;IAAC,UAAU,CAAC,EAAE,mBAAmB,CAAA;CAAC,CAAC;AAEjF,qBAAa,SAAU,SAAQ,KAAK;IAClC,OAAc,IAAI,EAAE,MAAM,CAAC;IAC3B,OAAc,UAAU,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,UAAS;IACvB,WAAW,UAAQ;IACnB,UAAU,CAAC,EAAE,mBAAmB,CAAC;gBAErB,OAAO,EAAE,MAAM,EAAE,EAAC,KAAK,EAAE,GAAG,OAAO,EAAC,GAAE,gBAAqB;CAO/E"}
1
+ {"version":3,"file":"base-error.d.ts","sourceRoot":"","sources":["../../src/base-error.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAC,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG;IAAC,UAAU,CAAC,EAAE,mBAAmB,CAAC;IAAC,cAAc,CAAC,EAAE,OAAO,CAAA;CAAC,CAAC;AAE3G,qBAAa,SAAU,SAAQ,KAAK;IAClC,OAAc,IAAI,EAAE,MAAM,CAAC;IAC3B,OAAc,UAAU,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,UAAS;IACvB,WAAW,UAAQ;IACnB,UAAU,CAAC,EAAE,mBAAmB,CAAC;gBAErB,OAAO,EAAE,MAAM,EAAE,EAAC,KAAK,EAAE,GAAG,OAAO,EAAC,GAAE,gBAAqB;CAQ/E"}
@@ -30,6 +30,7 @@ class BaseError extends Error {
30
30
  this.code = this.constructor.code;
31
31
  this.statusCode = this.constructor.statusCode;
32
32
  this.extensions = options.extensions;
33
+ this.reportToSentry = options.reportToSentry ?? this.reportToSentry;
33
34
  }
34
35
  }
35
36
  exports.BaseError = BaseError;
package/es/base-error.js CHANGED
@@ -24,6 +24,7 @@ export class BaseError extends Error {
24
24
  this.code = this.constructor.code;
25
25
  this.statusCode = this.constructor.statusCode;
26
26
  this.extensions = options.extensions;
27
+ this.reportToSentry = options.reportToSentry ?? this.reportToSentry;
27
28
  }
28
29
  }
29
30
  _defineProperty(BaseError, "code", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeshape/errors",
3
- "version": "11.13.0",
3
+ "version": "11.14.4",
4
4
  "description": "Custom error objects.",
5
5
  "homepage": "https://www.takeshape.io",
6
6
  "repository": {