FarmBot / farmbot_os

The operating system and all related software that runs on FarmBot's Raspberry Pi.
MIT License
1.01k stars 264 forks source link

Sequence Not Found error is not sent back to MQTT RPC Client #1496

Open jsimmonds2 opened 2 years ago

jsimmonds2 commented 2 years ago

Was playing around with the farmbot-js package today and noticed that {:error, "sequence not found"} cases aren't handled and just display on the FBOS Console log ( via stderr ? ) instead of being bundled up and returned to the the RPC Client as other errors are, so my JS program just quietly hangs ⏲️ . . .

There's an argument, I suppose, that I should enumerate all Sequences and check that the desired Sequence Id is available before trying to schedule it for execution, but the race condition there still exists ! ( that sequence can be deleted before I try to schedule it )

Here's the error splashed onto the IEx console 🙁

image