For certain specific types of failures when parsing messages, we raise InvalidMessageError, which is (AFAIK) handled reasonably by message handlers. However, when any other sort of exception is thrown (for example, we try to parse an int but got "steve"), it just propagates its way up without ever being handled, causing that component to crash.
Proposed solution: at the top-level message parser, catch all non-InvalidMessageError exceptions and convert them to InvalidMessageError.
For certain specific types of failures when parsing messages, we raise InvalidMessageError, which is (AFAIK) handled reasonably by message handlers. However, when any other sort of exception is thrown (for example, we try to parse an int but got "steve"), it just propagates its way up without ever being handled, causing that component to crash.
Proposed solution: at the top-level message parser, catch all non-InvalidMessageError exceptions and convert them to InvalidMessageError.