Error message for pods scheduling is repeated during SGCluster creation
Summary
When creating an SGCluster with errors on the operator spec for spec.pods.scheduling.tolerations, the text for the error message coming from the REST API is repeated.
- How it looks on the web console:
- How it comes on the REST API response:
{
"type":"https://stackgres.io/doc/1.2-dev/api/responses/error#constraint-violation",
"title":"Some fields do not comply with the syntactic rules",
"detail":"operator must be Exists when key is empty.\noperator must be Exists when key is empty.",
"status":422,
"fields":[
"spec.pods.scheduling.tolerations[0].key",
"spec.pods.scheduling.tolerations[0].operator"
]
}
Steps to reproduce
- Enter the web console
- Enter the Create Cluster form
- Try to create a cluster with a toleration with no key set
Expected Behaviour
- The text should only appear once on the REST API response
Environment
- StackGres version:
1.2.0
