@naturalcycles/js-lib 14.138.0 → 14.139.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.
@@ -20,6 +20,12 @@ export interface ErrorData {
20
20
  * Useful to be able to force-report e.g a 4xx error, which by default wouldn't be reported.
21
21
  */
22
22
  report?: boolean;
23
+ /**
24
+ * If defined - used by SentrySharedService in backend-lib.
25
+ * Allows to report only X% of errors of this type.
26
+ * E.g 0.1 will report 10% of errors (and ignore the 90%)
27
+ */
28
+ reportRate?: number;
23
29
  /**
24
30
  * Sometimes error.message gets "decorated" with extra information
25
31
  * (e.g frontend-lib adds a method, url, etc for all the errors)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/js-lib",
3
- "version": "14.138.0",
3
+ "version": "14.139.0",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "build-prod": "build-prod-esm-cjs",
@@ -24,6 +24,13 @@ export interface ErrorData {
24
24
  */
25
25
  report?: boolean
26
26
 
27
+ /**
28
+ * If defined - used by SentrySharedService in backend-lib.
29
+ * Allows to report only X% of errors of this type.
30
+ * E.g 0.1 will report 10% of errors (and ignore the 90%)
31
+ */
32
+ reportRate?: number
33
+
27
34
  /**
28
35
  * Sometimes error.message gets "decorated" with extra information
29
36
  * (e.g frontend-lib adds a method, url, etc for all the errors)