fix(xen-api/{get,put}Resource): add sync stack traces support
Follows 857a9f3ef
This commit is contained in:
parent
826de17111
commit
c1846e6ff3
@ -34,6 +34,7 @@
|
||||
- @xen-orchestra/fs major
|
||||
- @xen-orchestra/proxy minor
|
||||
- vhd-lib major
|
||||
- xen-api patch
|
||||
- xo-vmdk-to-vhd patch
|
||||
- xo-server minor
|
||||
- xo-web patch
|
||||
|
@ -388,7 +388,8 @@ export class Xapi extends EventEmitter {
|
||||
url.search = new URLSearchParams(query)
|
||||
await this._setHostAddressInUrl(url, host)
|
||||
|
||||
const response = await pRetry(
|
||||
const response = await this._addSyncStackTrace(
|
||||
pRetry(
|
||||
async () =>
|
||||
httpRequest($cancelToken, url.href, {
|
||||
rejectUnauthorized: !this._allowUnauthorized,
|
||||
@ -414,6 +415,7 @@ export class Xapi extends EventEmitter {
|
||||
},
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
if (pTaskResult !== undefined) {
|
||||
response.task = pTaskResult
|
||||
@ -480,7 +482,8 @@ export class Xapi extends EventEmitter {
|
||||
|
||||
// if body is a stream, sends a dummy request to probe for a redirection
|
||||
// before consuming body
|
||||
const response = await (isStream
|
||||
const response = await this._addSyncStackTrace(
|
||||
isStream
|
||||
? doRequest(url.href, {
|
||||
body: '',
|
||||
|
||||
@ -513,7 +516,8 @@ export class Xapi extends EventEmitter {
|
||||
throw error
|
||||
}
|
||||
)
|
||||
: doRequest(url.href))
|
||||
: doRequest(url.href)
|
||||
)
|
||||
|
||||
if (pTaskResult !== undefined) {
|
||||
pTaskResult = pTaskResult.catch(error => {
|
||||
|
Loading…
Reference in New Issue
Block a user