Page MenuHomePhabricator

Create a More General Solution for Error Propagation/Stack Trace Generation
Open, LowPublic

Description

Description

Some error types declare a "propagated error" key, which gives us the ability to create rudimentary stack traces. However, not all error types have this key. We should ensure that all errors can be captured in some kind of stack so that errors can be traced back to a root cause.

There are multiple ways this can be done. One way would be to ensure that all error types have an optional propagated error key. Another would be to make the error metadata a Z881/Typed List, where the head of the list is the most recent error and the tail is the propagated error. Yet another way would be to give each error type a non-optional Z883/Map member, which could optionally contain a propagated error.

We should then ensure that errors are properly merged together when one function calls another in the orchestrator.

Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)

  • find a solution for arbitrary nesting of propagated errors
  • create a (or repurpose an existing) helper function that facilitates the merging of metadata between calls

Completion checklist