@jetthai/cuora 1.1.481-api.1 → 1.1.481-api.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/package.json +1 -1
- package/src/request/request.js +3 -2
package/package.json
CHANGED
package/src/request/request.js
CHANGED
|
@@ -322,8 +322,9 @@ export default class Request {
|
|
|
322
322
|
}
|
|
323
323
|
} catch (error) {
|
|
324
324
|
if (this._isCancelled(error)) throw this._cancelledError()
|
|
325
|
-
|
|
326
|
-
|
|
325
|
+
// 不可列舉:避免 Bearer token 隨 JSON.stringify/Sentry 序列化外洩,但 error.requestToken 仍可讀取
|
|
326
|
+
if (requestToken && error && typeof error === 'object' && Object.isExtensible(error)) {
|
|
327
|
+
Object.defineProperty(error, 'requestToken', { value: requestToken, enumerable: false, configurable: true })
|
|
327
328
|
}
|
|
328
329
|
if (error.code === 'ERR_F108') {
|
|
329
330
|
this.isBlocked = true
|