diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-01-02 21:39:15 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2023-01-02 21:39:15 -0600 |
commit | 4eabc2d65aa742e6cf55822943f04275531d0375 (patch) | |
tree | 645742da4a45eef45019d2d0193f022b3672e01c /src/state/models/get-assertions-view.ts | |
parent | 6885fb2b41efdb29e386cf696ea7304baf3a87c8 (diff) | |
download | voidsky-4eabc2d65aa742e6cf55822943f04275531d0375.tar.zst |
Improve error logging
Diffstat (limited to 'src/state/models/get-assertions-view.ts')
-rw-r--r-- | src/state/models/get-assertions-view.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/state/models/get-assertions-view.ts b/src/state/models/get-assertions-view.ts index 4778ef132..bdb2c0894 100644 --- a/src/state/models/get-assertions-view.ts +++ b/src/state/models/get-assertions-view.ts @@ -80,11 +80,14 @@ export class GetAssertionsView { this.error = '' } - private _xIdle(err: string = '') { + private _xIdle(err?: any) { this.isLoading = false this.isRefreshing = false this.hasLoaded = true - this.error = err + this.error = err ? err.toString() : '' + if (err) { + this.rootStore.log.error('Failed to fetch assertions', err) + } } // loader functions @@ -99,7 +102,7 @@ export class GetAssertionsView { this._replaceAll(res) this._xIdle() } catch (e: any) { - this._xIdle(e.toString()) + this._xIdle(e) } } |