about summary refs log tree commit diff
path: root/src/state/models/session.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-01-02 21:39:15 -0600
committerPaul Frazee <pfrazee@gmail.com>2023-01-02 21:39:15 -0600
commit4eabc2d65aa742e6cf55822943f04275531d0375 (patch)
tree645742da4a45eef45019d2d0193f022b3672e01c /src/state/models/session.ts
parent6885fb2b41efdb29e386cf696ea7304baf3a87c8 (diff)
downloadvoidsky-4eabc2d65aa742e6cf55822943f04275531d0375.tar.zst
Improve error logging
Diffstat (limited to 'src/state/models/session.ts')
-rw-r--r--src/state/models/session.ts17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/state/models/session.ts b/src/state/models/session.ts
index 3efb5d2a6..13e0fcbe0 100644
--- a/src/state/models/session.ts
+++ b/src/state/models/session.ts
@@ -124,7 +124,7 @@ export class SessionModel {
     } catch (e: any) {
       this.rootStore.log.error(
         `Invalid service URL: ${this.data.service}. Resetting session.`,
-        e.toString(),
+        e,
       )
       this.clear()
       return false
@@ -160,10 +160,7 @@ export class SessionModel {
           this.rootStore.me.clear()
         }
         this.rootStore.me.load().catch(e => {
-          this.rootStore.log.error(
-            'Failed to fetch local user information',
-            e.toString(),
-          )
+          this.rootStore.log.error('Failed to fetch local user information', e)
         })
         return // success
       }
@@ -207,10 +204,7 @@ export class SessionModel {
       this.configureApi()
       this.setOnline(true, false)
       this.rootStore.me.load().catch(e => {
-        this.rootStore.log.error(
-          'Failed to fetch local user information',
-          e.toString(),
-        )
+        this.rootStore.log.error('Failed to fetch local user information', e)
       })
     }
   }
@@ -246,10 +240,7 @@ export class SessionModel {
       this.rootStore.onboard.start()
       this.configureApi()
       this.rootStore.me.load().catch(e => {
-        this.rootStore.log.error(
-          'Failed to fetch local user information',
-          e.toString(),
-        )
+        this.rootStore.log.error('Failed to fetch local user information', e)
       })
     }
   }