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
Acceptance Criteria
Description
We currently have an inconsistent way for handling errors for our public APIs. For example:
performSearch(which usesuseDataApi) works in conjunction withsearchResponseStoreto make available the loading and error states. If a request returns an error,searchResponseStore.isErroris set to true.fetchAggregationsthrows an error on a request errorWe should be consistent across our APIs -- probably need to make use of
useDataApiacross the board.NOTE: This would be a breaking change, since it would change the API.
Tasks
Acceptance Criteria