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 = (async () => {
208
- const result = await this.__request({
209
- $validate,
210
- $cache,
211
- $timeout,
212
- $socket,
213
- operationId,
214
- operation,
215
- path,
216
- body,
217
- query,
218
- headers,
219
- ...args
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].finally(() => {
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homey-api",
3
- "version": "3.0.16",
3
+ "version": "3.0.17",
4
4
  "description": "Homey API",
5
5
  "main": "index.js",
6
6
  "files": [