mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 05:01:19 -03:30
Expands the error handling capabilities for __all__ errors
This commit is contained in:
parent
d7a9d76d25
commit
b9e95b1158
@ -114,6 +114,12 @@ function AtFormController (eventService, strings) {
|
||||
|
||||
if (typeof err.data === 'object') {
|
||||
message = JSON.stringify(err.data);
|
||||
} if (_.has(err, 'data.__all__')) {
|
||||
if (typeof err.data.__all__ === 'object' && Array.isArray(err.data.__all__)) {
|
||||
message = JSON.stringify(err.data.__all__[0]);
|
||||
} else {
|
||||
message = JSON.stringify(err.data.__all__);
|
||||
}
|
||||
} else {
|
||||
message = err.data;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user