@naturalcycles/js-lib 14.161.4 → 14.162.0

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.
@@ -46,6 +46,12 @@ export interface ErrorData {
46
46
  * Can be used to force-group errors that are NOT needed to be split by endpoint or calling function.
47
47
  */
48
48
  fingerprint?: string[];
49
+ /**
50
+ * If set to true - it'll use error.message as fingerprint,
51
+ * so, all errors with the same message will be grouped together, even if they occurred in different places.
52
+ * Defaults to false.
53
+ */
54
+ fingerprintByMessage?: boolean;
49
55
  /**
50
56
  * Set when throwing an error from your backend code, to indicate desired http status code.
51
57
  * e.g throw new AppError('oj', { backendResponseStatusCode: 401 })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/js-lib",
3
- "version": "14.161.4",
3
+ "version": "14.162.0",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "build-prod": "build-prod-esm-cjs",
@@ -57,6 +57,13 @@ export interface ErrorData {
57
57
  */
58
58
  fingerprint?: string[]
59
59
 
60
+ /**
61
+ * If set to true - it'll use error.message as fingerprint,
62
+ * so, all errors with the same message will be grouped together, even if they occurred in different places.
63
+ * Defaults to false.
64
+ */
65
+ fingerprintByMessage?: boolean
66
+
60
67
  /**
61
68
  * Set when throwing an error from your backend code, to indicate desired http status code.
62
69
  * e.g throw new AppError('oj', { backendResponseStatusCode: 401 })