ansible / ansible-ui

The UIs for Ansible Projects such as AWX, EDA, and HUB.
https://ansible.github.io/ansible-ui/
Apache License 2.0
75 stars 65 forks source link

Update eda error adapter to handle generic detail errors from the api #3039

Closed mabashian closed 3 months ago

mabashian commented 3 months ago

In some instances, the API responds with an error structure that looks like:

{
    "detail": "Some error message"
}

EDA's error adapter currently interprets this as a "field" error. This is a common generic error pattern though and it is also observed in AWX. See https://github.com/ansible/ansible-ui/blob/main/frontend/awx/common/adapters/awxErrorAdapter.tsx#L15-L21 for a similar chunk of code in AWX's error handler.

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud