if (error.hasOwnProperty('status')&&error.status==401){
this.notifications.notify("Your login appears to have expired. Please log in again",()=>{this.authService.updateAgentContents().subscribe((_)=>{return})});
if (error.hasOwnProperty('error')&&error.error.hasOwnProperty('message')){
emsg=error.error.message;
}else{
emsg=error.message;
}
if (identity.expiry<Date.now()||(error.hasOwnProperty("status")&&error.status==401)){
this.notifications.notify("Your login has expired. Please log in again",()=>{this.authService.updateAgentContents().subscribe(()=>{return})});
returnthrowError(error);
}
if (error.hasOwnProperty("status")&&error.status==500){
this.notifications.notify("The Strudel2 API server had an error.\n Please report this via the contact us link.\nThe error message was"+emsg);
returnof([]);
}
this.tsub.unsubscribe();
if (identity.expiry<Date.now()){
this.notifications.notify("Your login has expired. Please log in again",()=>{this.authService.updateAgentContents().subscribe((_)=>{return})});
return;
if (error.hasOwnProperty("status")&&error.status==400){
this.notifications.notify(cmd+" unexpectedly returned an error message.\n Please report this vai the contact us link.\nThe error message was\n"+emsg);
returnthrowError(error);
}
console.error('getJobsError id',identity);
if (error.hasOwnProperty("error")&&error.error.hasOwnProperty("message")){
if (error.error.message.indexOf("Permission denied")!=-1){
this.notifications.notify("Your login appears to have expired. Please log in again",()=>{this.authService.updateAgentContents().subscribe((_)=>{return})});
return;
}
this.notifications.notify("Unable to retrieve a list of running jobs.\nThe error messge was "+error.error.message);
console.log(error);
return;
if (error.hasOwnProperty("status")&&error.status==504){
this.notifications.notify("The Server timed out while retrieveing a list of running jobs. Is the application server OK?");
returnof([]);
}
if (error.errorinstanceofErrorEvent){
this.notifications.notify("A networking error occured. Is your internet connection OK?")
returnthrowError(error);
}
}
publicgetJobsError(error,identity:Identity){
console.error(error);
this.notifications.notify("Unable to retrieve a list of running jobs.\nThe error wasn't specified\nPlease report what you were doign via the contact us link",()=>{this.authService.updateAgentContents().subscribe((_)=>{return})});
this.notifications.notify("Unable to retrieve a list of running jobs.\nThis is probably an error on our end.\nPlease report what you were doing via the contact us link",()=>{this.authService.updateAgentContents().subscribe((_)=>{return})});