Improve error logging

This commit is contained in:
Paul Frazee 2023-01-02 21:39:15 -06:00
parent 6885fb2b41
commit 4eabc2d65a
49 changed files with 212 additions and 188 deletions

View file

@ -25,7 +25,7 @@ export async function setupState() {
data = (await storage.load(ROOT_STATE_STORAGE_KEY)) || {}
rootStore.hydrate(data)
} catch (e: any) {
rootStore.log.error('Failed to load state from storage', e.toString())
rootStore.log.error('Failed to load state from storage', e)
}
rootStore.log.debug('Initial hydrate')
@ -36,7 +36,7 @@ export async function setupState() {
return rootStore.fetchStateUpdate()
})
.catch((e: any) => {
rootStore.log.warn('Failed initial connect', e.toString())
rootStore.log.warn('Failed initial connect', e)
})
// @ts-ignore .on() is correct -prf
api.sessionManager.on('session', () => {