Skip to content

Commit

Permalink
reduce logs due to memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
agouin committed Aug 17, 2023
1 parent 5d97914 commit 64e4e85
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/epochsTable/epochsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const EpochsTable = ({

if (epochsRes.status !== 200) {
message.error(`Error getting epochs: ${epochsRes.statusText}`)
console.error(epochsRes)
console.error(`Error getting epochs: ${epochsRes}`)
setLoading(false)
return
}
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const startVitals = async () => {
})
}
sse.onerror = (err) => {
console.error('Event source error', err)
console.error(`Event source error: ${err}`)
sse.close()
setTimeout(startVitals, 10000)
}
Expand Down
2 changes: 1 addition & 1 deletion lib/api/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const getCurrentConsensusRound = async () => {
}
res({ round: data.diem_consensus_current_round, epoch: data['diem_safety_rules_state.epoch'] })
} catch (err) {
console.error(err)
console.error(`Error getting current epoch round: ${err}`)
res({ round: 0, epoch: 0})
}
}))
Expand Down
2 changes: 1 addition & 1 deletion pages/address/[address].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,8 @@ const AddressPage = ({ account, towerState, errors }: AddressPageProps) => {
)
}
if (errors.length > 0) {
console.error(errors)
for (const error of errors) {
console.error(`Address error: ${error.message} (${error.code})`)
message.error(`${error.message} (${error.code})`)
}
}
Expand Down
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
},
}
} catch (err) {
console.error(err)
console.error(`Index error: ${err}`)
return {
props: {
error: true,
Expand Down

0 comments on commit 64e4e85

Please sign in to comment.