mirror of
https://github.com/ansible/awx.git
synced 2026-05-10 10:57:35 -02:30
Adds catch block to catch 404 case on applications form page
This commit is contained in:
@@ -12,7 +12,15 @@ const listTemplate = require('~features/applications/list-applications.view.html
|
|||||||
const indexTemplate = require('~features/applications/index.view.html');
|
const indexTemplate = require('~features/applications/index.view.html');
|
||||||
const userListTemplate = require('~features/applications/list-applications-users.view.html');
|
const userListTemplate = require('~features/applications/list-applications-users.view.html');
|
||||||
|
|
||||||
function ApplicationsDetailResolve ($q, $stateParams, Me, Application, Organization) {
|
function ApplicationsDetailResolve (
|
||||||
|
$q,
|
||||||
|
$stateParams,
|
||||||
|
Me,
|
||||||
|
Application,
|
||||||
|
Organization,
|
||||||
|
ProcessErrors,
|
||||||
|
strings
|
||||||
|
) {
|
||||||
const id = $stateParams.application_id;
|
const id = $stateParams.application_id;
|
||||||
|
|
||||||
const promises = {
|
const promises = {
|
||||||
@@ -42,6 +50,13 @@ function ApplicationsDetailResolve ($q, $stateParams, Me, Application, Organizat
|
|||||||
|
|
||||||
return models;
|
return models;
|
||||||
});
|
});
|
||||||
|
})
|
||||||
|
.catch(({ data, status, config }) => {
|
||||||
|
ProcessErrors(null, data, status, null, {
|
||||||
|
hdr: strings.get('error.HEADER'),
|
||||||
|
msg: strings.get('error.CALL', { path: `${config.url}`, status })
|
||||||
|
});
|
||||||
|
return $q.reject();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +65,9 @@ ApplicationsDetailResolve.$inject = [
|
|||||||
'$stateParams',
|
'$stateParams',
|
||||||
'MeModel',
|
'MeModel',
|
||||||
'ApplicationModel',
|
'ApplicationModel',
|
||||||
'OrganizationModel'
|
'OrganizationModel',
|
||||||
|
'ProcessErrors',
|
||||||
|
'ApplicationsStrings'
|
||||||
];
|
];
|
||||||
|
|
||||||
function ApplicationsRun ($stateExtender, strings) {
|
function ApplicationsRun ($stateExtender, strings) {
|
||||||
|
|||||||
Reference in New Issue
Block a user