Skip to content

Commit

Permalink
link received errors to correct notification id
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef-MrBeam committed Oct 24, 2023
1 parent 790457f commit 593e44f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion octoprint_mrbeam/iobeam/iobeam_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1215,8 +1215,15 @@ def _handle_error_message(self, message):
MrBeamEvents.HARDWARE_MALFUNCTION,
dict(data=message),
)
if (
message.get("id")
and message.get("id") in HwMalfunctionHandler.KNOWN_MALFUNCTIONS
):
notification_id = message.get("id")
else:
notification_id = HwMalfunctionHandler.HARDWARE_MALFUNCTION_NON_I2C
notification = self._user_notification_system.get_notification(
notification_id=HwMalfunctionHandler.HARDWARE_MALFUNCTION_NON_I2C,
notification_id=notification_id,
err_code=malfunction.error_code,
replay=True,
)
Expand Down

0 comments on commit 593e44f

Please sign in to comment.