homebridge-broadlink-rm
Version:
Broadlink RM plugin (including the mini and pro) for homebridge: https://github.com/nfarina/homebridge
17 lines (11 loc) • 308 B
JavaScript
const { TIMEOUT_CANCELLATION } = require('./errors')
const catchDelayCancelError = async (originalMethod) => {
let result
try {
result = await originalMethod()
} catch (err) {
if (err.message !== TIMEOUT_CANCELLATION) throw err
}
return result
}
module.exports = catchDelayCancelError