Throughout trust quorum, and likely in other cases, we return errors when invariants aren't met. The easiest way to do this inside a transaction is to call the bail_unless! macro. Unfortunately this always returns a 500 error that is then likely to be presented to the API. It would be better to not use this, or to build a similar macro that can return better error codes.
Throughout trust quorum, and likely in other cases, we return errors when invariants aren't met. The easiest way to do this inside a transaction is to call the
bail_unless!macro. Unfortunately this always returns a 500 error that is then likely to be presented to the API. It would be better to not use this, or to build a similar macro that can return better error codes.