Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent API for request functions #150

Open
5 tasks
jhpedemonte opened this issue Aug 7, 2020 · 0 comments
Open
5 tasks

Consistent API for request functions #150

jhpedemonte opened this issue Aug 7, 2020 · 0 comments
Milestone

Comments

@jhpedemonte
Copy link
Member

Description

We currently have an inconsistent way for handling errors for our public APIs. For example:

  • performSearch (which uses useDataApi) works in conjunction with searchResponseStore to make available the loading and error states. If a request returns an error, searchResponseStore.isError is set to true.
  • fetchAggregations throws an error on a request error

We should be consistent across our APIs -- probably need to make use of useDataApi across the board.

NOTE: This would be a breaking change, since it would change the API.

Tasks

  • Architect for consistent loading/error/cancellation handling across all of the public APIs.
  • Implement changes
  • Update docs
  • Update tests

Acceptance Criteria

  • Deb can use the public APIs and handle errors in a consistent manner.
@jhpedemonte jhpedemonte added this to the 2.0 milestone Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant