Skip to content

insights: make aggregation not available reasons user consumable

Administrator requested to merge cw/better-reasons into main

Created by: chwarwick

Updated the checks to see if grouping by a mode is possible to return the reason it is not, so that those more specific reasons can be returned to the UI.

Updated the default mode logic to remove early error returns, it should not error but continue on until it finds a type that is possible. If the query is invalid executing the search will return an error with the reason why.

Reasons are close to each other now and if we need another round of updating will be easy. I'll address the search timeout error message in https://github.com/sourcegraph/sourcegraph/issues/41010

closes https://github.com/sourcegraph/sourcegraph/issues/40870

Test plan

updated unit tests Screen Shot 2022-08-29 at 5 03 18 PM Screen Shot 2022-08-29 at 5 03 30 PM Screen Shot 2022-08-29 at 5 03 39 PM Screen Shot 2022-08-29 at 5 06 41 PM

Merge request reports

Loading