You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feature(#723): Improve client error handling [Part 1]
This PR sets up the initial reducer/master plumbing for error handling
by introducing a "transients" option bag containing errors.
The goal of this change is to be as backwards-compatible as possible,
with subsequent changes building on top of the API extensions added
here.
Notes:
- Previously, there was an assumption that the state resulting from a
reducer processing an action is suitable for client consumption.
- Now, transient artifacts might be appended onto the state and need to
be stripped before being sent to the client.
- To work around this change, I added some new types to help signal
the "transient" nature of State that enters and exits the reducer.
- I'm assuming the master is the single caller of the core reducer and
leaving it up to the master to do this stripping.
* XXXSQUASHXXX: Iterate on PR feedback (3).
- Fix typo in error codes
- Fix typo in optional type.
- Strip transients early in the reducer, obviating type changes to the
plugins/main code.
- Unify the re-dispatch-on-transient pattern between master and client
with a new middleware.
- Fix some fragile tests (See #941).
- Narrow client/master test changes for new functionality. Left some
TODO/dev notes for things to be done in subsequent PRs for #723 and for
hypothetical future discussion.
- Remove currently unused ActionResult to avoid extraneous diffs.
* Expand union type to include undefined
Co-authored-by: Chris Swithinbank <[email protected]>
* Update error types for action_invalid.
Co-authored-by: Chris Swithinbank <[email protected]>
0 commit comments