@emoyly/problem 4.1.11 → 4.1.12

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.
@@ -38,7 +38,7 @@ class MiddlewareBase {
38
38
  break;
39
39
  }
40
40
  if (!problems.length && this.enableFallback) {
41
- problems.push(new problem_1.Problem(Object.assign(Object.assign({}, this.fallback), { 'errorObject': input })));
41
+ problems.push(new problem_1.Problem(Object.assign(Object.assign({}, this.fallback), { 'errorObject': input, 'stack': input === null || input === void 0 ? void 0 : input.stack })));
42
42
  }
43
43
  return problems;
44
44
  });
@@ -34,7 +34,7 @@ class ExpressMiddleware extends base_1.MiddlewareBase {
34
34
  res
35
35
  .contentType('application/problem+json')
36
36
  .status(500)
37
- .json([new problem_1.Problem(Object.assign(Object.assign({}, defaults_1.otherErrors.unknown), { 'instance': req.originalUrl, 'status': 500 })).toObject()]);
37
+ .json([new problem_1.Problem(Object.assign(Object.assign({}, defaults_1.otherErrors.unknown), { 'instance': req.originalUrl, 'status': 500, 'stack': err === null || err === void 0 ? void 0 : err.stack })).toObject()]);
38
38
  throw err;
39
39
  });
40
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emoyly/problem",
3
- "version": "4.1.11",
3
+ "version": "4.1.12",
4
4
  "description": "A simple error library based around the RFC-7807 standard with optional support for Sentry.io and Express",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -257,7 +257,7 @@
257
257
  "affectsGlobalScope": false
258
258
  },
259
259
  "../src/middleware/base.ts": {
260
- "version": "9755abbcbf7a41eeeca459812381e134cfd5930b6feea55c6126bf3f8d3c2154",
260
+ "version": "d4da729592b3bcd3efdf9fe81dea0ab6c5a3d783ee2d35f10e5f8527556b0eee",
261
261
  "signature": "d8569c92d311b2efd3fe8990529df7b948868943ee8ede78333abd1cd529e45f",
262
262
  "affectsGlobalScope": false
263
263
  },
@@ -567,7 +567,7 @@
567
567
  "affectsGlobalScope": false
568
568
  },
569
569
  "../src/middleware/express.ts": {
570
- "version": "0cb616a76981e6be65c564aad8c95fa8fcc39457efed74b354fbec4d3c6883d9",
570
+ "version": "3e0496fdcd6ef2e962662e15abadd03dd7cd9f2444249f4ce149aef454e16dd6",
571
571
  "signature": "c177662361bc74966e4cfb8d7e1bf1762cb695638580644811a5e70f8fa5f342",
572
572
  "affectsGlobalScope": false
573
573
  },