This repository was archived by the owner on May 17, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initalArgs to error payload (#141)
Sometimes to properly handle an error you need access to the initial request context. This PR adds initialArgs to the error payload. An example of when this is necessary is a single reducer that stores the results of multiple API requests under different keys. For example: ``` a: APICall ResponseA b: APICall ResponseB c: APICall ResponseC ``` Under the current framework, if we handle an error in our reducer, we don't know whether the error is tied to a, b, or c. One way to solve this is to have a handler on the server try/catch and return an identifier (e.g. A), but this is not always possible. If a timeout or network error occurred, the handler on the server might not even be invoked and therefore wouldn't have the opportunity to provide an indentifier to the request.
- Loading branch information