fix(xen-api/getResource): don't fail silently when HTTP request fails without response (#6970)

Seen while investigating zammad#16309
This commit is contained in:
Florent BEAUCHAMP
2023-08-08 09:39:18 +02:00
committed by GitHub
parent 685400bbf8
commit 66bee59774
2 changed files with 2 additions and 1 deletions

View File

@@ -29,6 +29,7 @@
<!--packages-start-->
- xen-api patch
- xo-server patch
- xo-server-auth-ldap patch
- xo-web patch

View File

@@ -419,7 +419,7 @@ export class Xapi extends EventEmitter {
signal: $cancelToken,
}),
{
when: error => error.response.statusCode === 302,
when: error => error.response !== undefined && error.response.statusCode === 302,
onRetry: async error => {
const response = error.response
if (response === undefined) {