Handle errors in GraphQL mutations within Design Management
What does this MR do?
Captures and handles errors for GraphQL mutations within design management (raised in #14673 (closed)). Specifically:
- Adds
errors
field to GraphQL mutations, so thaterrors
are returned in the response for a mutation - Handles these errors when attempting to update the cache in
cache_update
We (FE) are defaulting to generic error messages for the meantime, but there is a possibility that we will be able to present the server-generated message to the user in the future (see #30780 (closed) for the discussion around this). tl;dr: errors
may eventually contain error messages that we can directly present to the user.
This MR is simply an in-between solution so that at least the user gets some feedback if an error occurs.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖