Skip to content

Force user to opt in to receiving a thrown error #151

Open
@chawes13

Description

@chawes13

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions