Description
all functions that return without exception set a green check status in the weave trace UI
a typical case is code (especially legacy code) which expresses failure as a state rather than raising an exception
Suggested Solution
providing a simple interface on weave.op(status_decoder=f) for a parameter which is approximately f: ResultType → bool is sufficient to enable control of statuses by output data.
to permit more variance, the UI could be updated to support other symbols (other than green check or red x), i.e. the set of emoji, and users could provide f:ResultType → int, where int is a natural number indexing the set of emoji, or even an emoji directly as a string value.
Weave Project Link
No response
Screenshots or Mockups
