We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d02efe commit 1bd4aedCopy full SHA for 1bd4aed
src/controller/model/endpoint.ts
@@ -628,9 +628,18 @@ class Endpoint extends Entity {
628
this.save();
629
} catch (error) {
630
const err = error as Error;
631
- err.message = `${log} failed (${err.message})`;
632
- logger.debug(err.stack!, NS);
633
- throw error;
+ if ((err as Zdo.StatusError).code == 136) {
+ /* Device returned NO_ENTRY error, meaning the bind is not present
+ * Do not threat this as an error and remove the entry from the database instead.
634
+ */
635
+ logger.debug(`${log} failed (${err.message}), removing entry from database.`, NS);
636
+ this._binds.splice(index, 1);
637
+ this.save();
638
+ } else {
639
+ err.message = `${log} failed (${err.message})`;
640
+ logger.debug(err.stack!, NS);
641
+ throw error;
642
+ }
643
}
644
645
0 commit comments