FlowFuse / device-agent

An agent to run FlowFuse managed instances of Node-RED on devices
Apache License 2.0
15 stars 8 forks source link

Protect against unhandled exceptions #212

Closed Steve-Mcl closed 9 months ago

Steve-Mcl commented 9 months ago

Description

Anywhere agent.setState is called, ensure it is either awaited or has a .catch handler.

This will prevent crashes like when an async event callback encounters an exception (e.g. mqtt.on, process.on)

Related Issue(s)

207

Checklist

Labels