@naturalcycles/js-lib 14.153.1 → 14.153.2
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.
- package/dist/http/fetcher.js +4 -1
- package/dist-esm/http/fetcher.js +4 -1
- package/package.json +1 -1
- package/src/http/fetcher.ts +4 -2
package/dist/http/fetcher.js
CHANGED
|
@@ -9,6 +9,7 @@ const number_util_1 = require("../number/number.util");
|
|
|
9
9
|
const object_util_1 = require("../object/object.util");
|
|
10
10
|
const pDelay_1 = require("../promise/pDelay");
|
|
11
11
|
const json_util_1 = require("../string/json.util");
|
|
12
|
+
const stringifyAny_1 = require("../string/stringifyAny");
|
|
12
13
|
const time_util_1 = require("../time/time.util");
|
|
13
14
|
const http_model_1 = require("./http.model");
|
|
14
15
|
const defRetryOptions = {
|
|
@@ -315,7 +316,9 @@ class Fetcher {
|
|
|
315
316
|
(0, time_util_1._since)(res.req.started),
|
|
316
317
|
]
|
|
317
318
|
.filter(Boolean)
|
|
318
|
-
.join(' ')
|
|
319
|
+
.join(' ') + '\n',
|
|
320
|
+
// We're stringifying the error here, otherwise Sentry shows it as [object Object]
|
|
321
|
+
(0, stringifyAny_1._stringifyAny)(res.err.cause || res.err));
|
|
319
322
|
}
|
|
320
323
|
if (retryStatus.retryStopped)
|
|
321
324
|
return;
|
package/dist-esm/http/fetcher.js
CHANGED
|
@@ -6,6 +6,7 @@ import { _clamp } from '../number/number.util';
|
|
|
6
6
|
import { _filterNullishValues, _filterUndefinedValues, _mapKeys, _merge, _omit, _pick, } from '../object/object.util';
|
|
7
7
|
import { pDelay } from '../promise/pDelay';
|
|
8
8
|
import { _jsonParse, _jsonParseIfPossible } from '../string/json.util';
|
|
9
|
+
import { _stringifyAny } from '../string/stringifyAny';
|
|
9
10
|
import { _since } from '../time/time.util';
|
|
10
11
|
import { HTTP_METHODS } from './http.model';
|
|
11
12
|
const defRetryOptions = {
|
|
@@ -302,7 +303,9 @@ export class Fetcher {
|
|
|
302
303
|
_since(res.req.started),
|
|
303
304
|
]
|
|
304
305
|
.filter(Boolean)
|
|
305
|
-
.join(' ')
|
|
306
|
+
.join(' ') + '\n',
|
|
307
|
+
// We're stringifying the error here, otherwise Sentry shows it as [object Object]
|
|
308
|
+
_stringifyAny(res.err.cause || res.err));
|
|
306
309
|
}
|
|
307
310
|
if (retryStatus.retryStopped)
|
|
308
311
|
return;
|
package/package.json
CHANGED
package/src/http/fetcher.ts
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
} from '../object/object.util'
|
|
16
16
|
import { pDelay } from '../promise/pDelay'
|
|
17
17
|
import { _jsonParse, _jsonParseIfPossible } from '../string/json.util'
|
|
18
|
+
import { _stringifyAny } from '../string/stringifyAny'
|
|
18
19
|
import { _since } from '../time/time.util'
|
|
19
20
|
import { NumberOfMilliseconds } from '../types'
|
|
20
21
|
import type {
|
|
@@ -405,8 +406,9 @@ export class Fetcher {
|
|
|
405
406
|
_since(res.req.started),
|
|
406
407
|
]
|
|
407
408
|
.filter(Boolean)
|
|
408
|
-
.join(' '),
|
|
409
|
-
|
|
409
|
+
.join(' ') + '\n',
|
|
410
|
+
// We're stringifying the error here, otherwise Sentry shows it as [object Object]
|
|
411
|
+
_stringifyAny(res.err.cause || res.err),
|
|
410
412
|
)
|
|
411
413
|
}
|
|
412
414
|
|