From 3485cb4ec49f8f0c123494dc436d5d4ab43091e8 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Tue, 5 Jan 2016 16:09:06 +0100 Subject: [PATCH] Guard against null/undefined error.res. --- packages/xen-api/src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/xen-api/src/index.js b/packages/xen-api/src/index.js index e86a3bd82..6a3934df2 100644 --- a/packages/xen-api/src/index.js +++ b/packages/xen-api/src/index.js @@ -578,7 +578,7 @@ export class Xapi extends EventEmitter { // If the server failed, it is probably due to an excessively // large response. // Falling back to legacy events watch should be enough. - error && error.res.statusCode === 500 + error && error.res && error.res.statusCode === 500 ) { return this._watchEventsLegacy() }