Skip to content

Consistent API for request functions  #150

@jhpedemonte

Description

@jhpedemonte

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions