Improve error logging
This commit is contained in:
parent
6885fb2b41
commit
4eabc2d65a
49 changed files with 212 additions and 188 deletions
|
@ -37,7 +37,7 @@ export const Home = observer(function Home({
|
|||
}
|
||||
store.log.debug('Polling home feed')
|
||||
store.me.mainFeed.checkForLatest().catch(e => {
|
||||
store.log.error('Failed to poll feed', e.toString())
|
||||
store.log.error('Failed to poll feed', e)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -65,10 +65,12 @@ export const Log = observer(function Log({navIdx, visible}: ScreenParams) {
|
|||
</Text>
|
||||
</TouchableOpacity>
|
||||
{expanded.includes(entry.id) ? (
|
||||
<View style={[pal.btn, styles.details]}>
|
||||
<Text type="body1" style={pal.text}>
|
||||
{entry.details}
|
||||
</Text>
|
||||
<View style={[pal.view, s.pl10, s.pr10, s.pb10]}>
|
||||
<View style={[pal.btn, styles.details]}>
|
||||
<Text type="mono1" style={pal.text}>
|
||||
{entry.details}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
) : undefined}
|
||||
</View>
|
||||
|
|
|
@ -19,7 +19,7 @@ export const Notifications = ({navIdx, visible}: ScreenParams) => {
|
|||
store.me.notifications
|
||||
.update()
|
||||
.catch(e => {
|
||||
store.log.error('Error while updating notifications feed', e.toString())
|
||||
store.log.error('Error while updating notifications feed', e)
|
||||
})
|
||||
.then(() => {
|
||||
store.me.notifications.updateReadState()
|
||||
|
|
|
@ -38,7 +38,7 @@ export const PostThread = ({navIdx, visible, params}: ScreenParams) => {
|
|||
}
|
||||
},
|
||||
err => {
|
||||
store.log.error('Failed to fetch thread', err.toString())
|
||||
store.log.error('Failed to fetch thread', err)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
|
|
@ -63,17 +63,14 @@ export const Profile = observer(({navIdx, visible, params}: ScreenParams) => {
|
|||
uiState
|
||||
.refresh()
|
||||
.catch((err: any) =>
|
||||
store.log.error('Failed to refresh user profile', err.toString()),
|
||||
store.log.error('Failed to refresh user profile', err),
|
||||
)
|
||||
}
|
||||
const onEndReached = () => {
|
||||
uiState
|
||||
.loadMore()
|
||||
.catch((err: any) =>
|
||||
store.log.error(
|
||||
'Failed to load more entries in user profile',
|
||||
err.toString(),
|
||||
),
|
||||
store.log.error('Failed to load more entries in user profile', err),
|
||||
)
|
||||
}
|
||||
const onPressTryAgain = () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue