smartrent / grizzly

Elixir Z-Wave Library

Home Page:https://hex.pm/packages/grizzly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Better Errors

mattludwigs opened this issue · comments

Currently Grizzly explodes loudly when we are unable to parse binary correctly. This is useful for local development but not ideal for real-world applications, as we have learned that even if a device passes spec they might send bytes that are slightly outside of the speciation. If this is done quickly enough and we crash too many times to fast this will hit the max restarts and will cause the entire application to crash until a reboot takes place.

We should pass decode errors to the caller so that they can decide on what to do with the error.