Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
$uiRouter.transitionService.onError(match, ($transition) => {
if ($transition.error().type !== RejectType.ERROR)
return;
go($transition);
});
transition => (transition.error().type !== RejectType.ERROR
? this.$q.when()
: this.goBack().then(() => this.displayErrorMessage(transition.error()))),
);
$state.defaultErrorHandler((error) => {
if (error.type === RejectType.ERROR) {
$state.go(
'pci.error',
{
detail: {
message: get(error.detail, 'data.message'),
code: has(error.detail, 'headers')
? error.detail.headers('x-ovh-queryId')
: null,
},
},
{ location: false },
);
}
});
},
$uiRouter.transitionService.onError(match, ($transition) => {
if ($transition.error().type !== RejectType.ERROR)
return;
go($transition);
});
$state.defaultErrorHandler((error) => {
if (error.type === RejectType.ERROR) {
$state.go(
'error',
{
detail: {
message: get(error.detail, 'data.message'),
code: has(error.detail, 'headers')
? error.detail.headers('x-ovh-queryId')
: null,
},
},
{ location: false },
);
}
});
(transition) =>
transition.error().type !== RejectType.ERROR
? this.$q.when()
: this.goBack().then(() =>
this.displayErrorMessage(transition.error()),
),
);
$state.defaultErrorHandler((error) => {
if (error.type === RejectType.ERROR) {
$state.go(
'app.error',
{
detail: {
message: get(error.detail, 'data.message'),
code: has(error.detail, 'headers')
? error.detail.headers('x-ovh-queryId')
: null,
},
},
{ location: false },
);
}
});
},
$state.defaultErrorHandler((error) => {
if (error.type === RejectType.ERROR) {
$state.go('error', {
detail: {
message: _.get(error.detail, 'data.message'),
code: _.has(error.detail, 'headers') ? error.detail.headers('x-ovh-queryId') : null,
},
}, { location: false });
}
});
$state.defaultErrorHandler((error) => {
if (error.type === RejectType.ERROR) {
$state.go('error', {
detail: {
message: get(error.detail, 'data.message'),
code: has(error.detail, 'headers') ? error.detail.headers('x-ovh-queryId') : null,
},
}, { location: false });
}
});
$state.defaultErrorHandler((error) => {
if (error.type === RejectType.ERROR) {
$state.go(
'telecomError',
{
detail: {
message: get(error.detail, 'data.message'),
code: has(error.detail, 'headers')
? error.detail.headers('x-ovh-queryId')
: null,
},
},
{ location: false },
);
}
});
},