Go to agents-preview if the agent doesn't exist

This commit is contained in:
Jesús Ángel 2018-12-03 13:10:53 +01:00
parent 2f700110aa
commit 3649868fb6

View File

@ -560,6 +560,10 @@ export class AgentsController {
return;
} catch (error) {
this.errorHandler.handle(error, 'Agents');
if(error && typeof error === 'string' && error.includes('Agent does not exist')) {
this.$location.search('agent',null)
this.$location.path('/agents-preview')
}
}
return;
}