Since apiActions created via createRequest are typically handled in the reducer (via handleSuccess, handleFailure, or handleResponse), we usually do not add .catch() statements to each individual call that is mapped to dispatch as a prop. This results in some confusing console error message when a call fails (see LaunchPadLab/lp-requests#87).
Given that the default behavior is to not handle this error, I'm wondering if we should include an option that either:
- Returns the error (but doesn't throw it); or
- Ignores the error (after calling
failureAction and onUnauthorized)
An option could be failSilently or ignoreError? Need to do a bit of research about best practices / conventions.
Since apiActions created via
createRequestare typically handled in thereducer(viahandleSuccess,handleFailure, orhandleResponse), we usually do not add.catch()statements to each individual call that is mapped to dispatch as a prop. This results in some confusing console error message when a call fails (see LaunchPadLab/lp-requests#87).Given that the default behavior is to not handle this error, I'm wondering if we should include an option that either:
failureActionandonUnauthorized)An option could be
failSilentlyorignoreError? Need to do a bit of research about best practices / conventions.