UNPKG

homebridge-miot

Version:

Homebridge plugin for devices supporting the miot protocol

15 lines (10 loc) 413 B
const Errors = require("./Errors.js"); class ErrorUtils { static isNonRecoverableError(err) { if (err instanceof Errors.MissingDeviceId || err instanceof Errors.DeviceNotFound || err instanceof Errors.UnknownDeviceModel || err instanceof Errors.MissingMiCloudCredentials) { // non recoverable errors, do not try to reconnect return true; } return false; } } module.exports = ErrorUtils;