mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 09:51:09 +03:00
Remove error response from unexpected server error messaging
This commit is contained in:
parent
1be9c3ba94
commit
e91d1e0eb0
@ -86,7 +86,11 @@ function AtFormController (eventService) {
|
||||
let handled;
|
||||
|
||||
if (err.status === 400) {
|
||||
handled = vm.handleValidationErrors(err.data);
|
||||
handled = vm.handleValidationError(err.data);
|
||||
}
|
||||
|
||||
if (err.status === 500) {
|
||||
handled = vm.handleUnexpectedError(err);
|
||||
}
|
||||
|
||||
if (!handled) {
|
||||
@ -102,7 +106,16 @@ function AtFormController (eventService) {
|
||||
}
|
||||
};
|
||||
|
||||
vm.handleValidationErrors = errors => {
|
||||
vm.handleUnexpectedError = err => {
|
||||
let title = 'Unable to Submit';
|
||||
let message = 'Unexpected server error. View the console for more information';
|
||||
|
||||
vm.modal.show(title, message);
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
vm.handleValidationError = errors => {
|
||||
let errorMessageSet = vm.setValidationMessages(errors);
|
||||
|
||||
if (errorMessageSet) {
|
||||
|
@ -44,7 +44,6 @@ function httpPost (data) {
|
||||
}
|
||||
|
||||
function httpPut (changes) {
|
||||
console.log(this.get(), changes);
|
||||
let model = Object.assign(this.get(), changes);
|
||||
|
||||
let req = {
|
||||
|
Loading…
Reference in New Issue
Block a user