mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 17:28:51 -03:30
Merge pull request #402 from jaredevantabor/org-save-error-catching
catching org save error
This commit is contained in:
@@ -54,9 +54,16 @@ export default ['$scope', '$rootScope', '$location', '$stateParams',
|
|||||||
.catch(({data, status}) => {
|
.catch(({data, status}) => {
|
||||||
ProcessErrors($scope, data, status, form, {
|
ProcessErrors($scope, data, status, form, {
|
||||||
hdr: 'Error!',
|
hdr: 'Error!',
|
||||||
msg: 'Failed to add new organization. Post returned status: ' + status
|
msg: 'Failed to save instance groups. POST returned status: ' + status
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch(({data, status}) => {
|
||||||
|
let explanation = _.has(data, "name") ? data.name[0] : "";
|
||||||
|
ProcessErrors($scope, data, status, OrganizationForm, {
|
||||||
|
hdr: 'Error!',
|
||||||
|
msg: `Failed to save organization. PUT status: ${status}. ${explanation}`
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user