From e18be7cf00c1697179916df8e20169ec84cfa63b Mon Sep 17 00:00:00 2001
From: Chris Hines <chris.hines@monash.edu>
Date: Fri, 22 May 2020 15:08:18 +1000
Subject: [PATCH] I think this is a fix for
 https://gitlab.erc.monash.edu.au/hpc-team/strudelv2_spa/-/issues/132

---
 src/app/jobs.service.ts | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/app/jobs.service.ts b/src/app/jobs.service.ts
index 4417d39..0b6cf6c 100644
--- a/src/app/jobs.service.ts
+++ b/src/app/jobs.service.ts
@@ -41,12 +41,16 @@ export class JobsService {
   }
 
   public getJobsError(error,identity: Identity) {
+    this.tsub.unsubscribe();
     if (error.hasOwnProperty("error") && error.error.hasOwnProperty("message")) {
-      this.notifications.notify(error.error.message);
-      this.tsub.unsubscribe();
+      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});
+      } else {
+        this.notifications.notify(error.error.message);
+      }
       return;
     }
-    this.tsub.unsubscribe()
     this.authService.updateAgentContents().subscribe((_) => {return});
   }
 
-- 
GitLab