Improve error logging

This commit is contained in:
Paul Frazee
2023-01-02 21:39:15 -06:00
parent c758996034
commit bc571ee998
49 changed files with 212 additions and 188 deletions
+6 -3
View File
@@ -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)
}
}