Fix error messages for policy editor's yaml mode
What does this MR do and why?
This MR fixes certain error messages not being displayed in policy editor's yaml mode.
Screenshots or screen recordings
Before | After |
---|---|
error_handling_before | error_handling_after |
How to set up and validate locally
- Navigate to Policies -> New policy -> Scan result policy
- Switch to yaml mode, enter the following:
type: scan_result_policy name: Test description: '' enabled: true rules: - type: scan_finding branches: [] scanners: [] vulnerabilities_allowed: 0 severity_levels: [] vulnerability_states: [] actions: - type: require_approval approvals_required: 2 user_approvers_ids: - 4
- Submit
- Error alert should be shown on top
- Remove
user_approvers_ids
from yaml and switch to the rule mode - Select
Individual users
fromChoose approver type
, select any user - Submit
- Error should still be shown in the
Actions
section (the current behavior)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #395545 (closed)