Aggregation: Improve error states for aggregation UI
Created by: vovakulikov
Closes https://github.com/sourcegraph/sourcegraph/issues/40940 Based on https://github.com/sourcegraph/sourcegraph/pull/40905
Background
In aggregation UI we usually can have two types of errors
- internal error that something happened with frontend service or network request
- business-logic errors when we can't run aggregation against current query (or we do not support some of pattern type value)
Prior to this PR we use just muted text for all types of errors and put this text in a middle of the chart layout.
In this PR we separate UI for different cases
Search is not available error | Internal backend error |
---|---|
Tech note
In this PR as well we changed gql schema in order to avoid handling nested optional fields on the frontend.
Test plan
- Make sure that both side panel and full UI mode have a proper UI for both types of error
- Make sure that CI doesn't fail (This PR changes gql schema so it worth checking go tasks as well)