Add error handling for sec config license fetch
On the "Security & Compliance" configuration page we use a GraphQL query (currentLicense
) to fetch the current instance's plan tier.
We then use the response to either show (on "Ultimate") or hide the tab that shows the security-training related settings:
Currently on production this query returns an error, unless the current user has the "admin" role. This causes the configuration security-training section be hidden for all non-admin users. (more info on internal slack channel: https://gitlab.slack.com/archives/C6MLS3XEU/p1651709364760349)
This commit adds an error handler to the query, which will make sure that any query-failure does not result in the feature being hidden.
It will somewhat revert the changes from !85768 (merged) , but fixing this should be addressed separately. By either changing the permissions for the currently used query (currentLicense
), or use a different means to determine how to display the security-training configuration.