Rails: Handle devfile gem validation errors as UI errors instead of 500 exceptions
- MR (Rails): Properly handle Devfile::CliError (!127289 - merged)
- Issue (
devfile-gem): Devfile Gem: Handle devfile gem validation erro... (#419477 - closed) - MR (
devfile-gem): https://gitlab.com/gitlab-org/remote-development/devfile-gem/-/merge_requests/42+ - Likely duplicate issues:
Description
As a user, I want devfile validation errors to be presented as a descriptive user error and not a 500 error.
This should addresses several "User initiated errors" from the epic: Robust Error Handling and Logging (&10461 - closed)
Acceptance Criteria
-
The 500errors described in &10461 (closed) should now be returned as error messages in the Web UI. -
We should also handle any errors from the #get_allcall in the reconcile logic as well, as discussed here: !126785 (comment 1496417083)- Any failures in parsing/flattening a single workspace should not prevent other workspaces from being processed
Technical Requirements
-
Adds a custom Devfile::CliErrorexception to thedevfilegem. MR: https://gitlab.com/gitlab-org/remote-development/devfile-gem/-/merge_requests/42+ -
Rescues that exception in Rails and handles it as a domain error, which should automatically get routed back to the UI as a GraphQL error. MR: Pending
Edited by Chad Woolley