Improve error logging
This commit is contained in:
@@ -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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user