mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 10:11:05 -03:30
Expands the error handling capabilities for __all__ errors
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user