From b9e95b11584128d538eb78454d8589883e5ab8fa Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Mon, 6 Aug 2018 11:55:59 -0700 Subject: [PATCH] Expands the error handling capabilities for __all__ errors --- awx/ui/client/lib/components/form/form.directive.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/awx/ui/client/lib/components/form/form.directive.js b/awx/ui/client/lib/components/form/form.directive.js index e0ac85c595..97a30911d0 100644 --- a/awx/ui/client/lib/components/form/form.directive.js +++ b/awx/ui/client/lib/components/form/form.directive.js @@ -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; }