homey-api 3.0.16 → 3.0.17
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.
|
@@ -204,23 +204,19 @@ class Manager extends EventEmitter {
|
|
|
204
204
|
return result;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
const pendingCall = (
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
return result;
|
|
223
|
-
})();
|
|
207
|
+
const pendingCall = this.__request({
|
|
208
|
+
$validate,
|
|
209
|
+
$cache,
|
|
210
|
+
$timeout,
|
|
211
|
+
$socket,
|
|
212
|
+
operationId,
|
|
213
|
+
operation,
|
|
214
|
+
path,
|
|
215
|
+
body,
|
|
216
|
+
query,
|
|
217
|
+
headers,
|
|
218
|
+
...args
|
|
219
|
+
});
|
|
224
220
|
|
|
225
221
|
if (
|
|
226
222
|
operation.method.toLowerCase() === 'get' &&
|
|
@@ -229,7 +225,10 @@ class Manager extends EventEmitter {
|
|
|
229
225
|
Object.keys(body).length === 0
|
|
230
226
|
) {
|
|
231
227
|
this.__pendingCalls[pendingCallId] = pendingCall;
|
|
232
|
-
this.__pendingCalls[pendingCallId].
|
|
228
|
+
this.__pendingCalls[pendingCallId].catch(() => {
|
|
229
|
+
// We do nothing with the error here the caller is responsible. We just want to
|
|
230
|
+
// cleanup the pending call.
|
|
231
|
+
}).finally(() => {
|
|
233
232
|
delete this.__pendingCalls[pendingCallId];
|
|
234
233
|
});
|
|
235
234
|
}
|