Properly display the error message upon container expiration policy validation
Summary
Follow up of !34063 (comment 357968187)
With !34063 (merged), regex used within container expiration policies are now validated.
If a user submits an invalid regex, an alert toast will be displayed with Something went wrong while updating (see examples !34063 (merged)).
This is quite vague. The rest API actually answers a very precise error. Example for regex [:
{
"message": {
"container_expiration_policy.name_regex_keep": [
"not valid RE2 syntax: missing ]: ["
]
}
}
The frontend can infer which field is wrong and why.
Improvements
- Have a better and more precise error message
Risks
- The error message is not displayed at all
Optional: Intended side effects
- Remove the
Troubleshootingsection added by !34063 (merged)