@naturalcycles/backend-lib 4.18.3 → 4.18.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.
@@ -92,14 +92,11 @@ class SentrySharedService {
92
92
  // It will log additional "breadcrumb object" before the error
93
93
  // It's a Breadcrumb, not a console.log, because console.log are NOT automatically attached as Breadcrumbs in cron-job environments (outside of Express)
94
94
  this.sentry().addBreadcrumb({
95
- message: (0, nodejs_lib_1.inspectAny)(err, INSPECT_OPT),
95
+ message: [err, data]
96
+ .filter(Boolean)
97
+ .map(a => (0, nodejs_lib_1.inspectAny)(a, INSPECT_OPT))
98
+ .join('\n'),
96
99
  });
97
- if (data) {
98
- // Log the attached ErrorData (if any)
99
- this.sentry().addBreadcrumb({
100
- message: (0, nodejs_lib_1.inspectAny)(data, INSPECT_OPT),
101
- });
102
- }
103
100
  return this.sentry().captureException(err);
104
101
  }
105
102
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/backend-lib",
3
- "version": "4.18.3",
3
+ "version": "4.18.4",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "serve": "APP_ENV=dev nodemon",
@@ -113,16 +113,12 @@ export class SentrySharedService {
113
113
  // It will log additional "breadcrumb object" before the error
114
114
  // It's a Breadcrumb, not a console.log, because console.log are NOT automatically attached as Breadcrumbs in cron-job environments (outside of Express)
115
115
  this.sentry().addBreadcrumb({
116
- message: inspectAny(err, INSPECT_OPT),
116
+ message: [err, data]
117
+ .filter(Boolean)
118
+ .map(a => inspectAny(a, INSPECT_OPT))
119
+ .join('\n'),
117
120
  })
118
121
 
119
- if (data) {
120
- // Log the attached ErrorData (if any)
121
- this.sentry().addBreadcrumb({
122
- message: inspectAny(data, INSPECT_OPT),
123
- })
124
- }
125
-
126
122
  return this.sentry().captureException(err)
127
123
  }
128
124