Skip to content

Commit

Permalink
improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
taoeffect committed Feb 21, 2025
1 parent 1b89e4d commit 6c417b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/controller/actions/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export async function syncContractsInOrder (groupedContractIDs: Object): Promise
const sortedContractTypes = Object.entries(groupedContractIDs).sort(([a], [b]) => {
return getContractSyncPriority(a) - getContractSyncPriority(b)
})
for (const [, contractIDs] of sortedContractTypes) {
for (const [type, contractIDs] of sortedContractTypes) {
// For each contract of this type, check if it still exists before syncing because
// e.g. syncing a group contract could have removed one of the chatroom contracts
// $FlowFixMe[incompatible-type]
Expand All @@ -372,8 +372,8 @@ export async function syncContractsInOrder (groupedContractIDs: Object): Promise
try {
await sbp('chelonia/contract/sync', contractID)
} catch (e) {
console.error(`syncContractsInOrder: failed to sync ${contractID}:`, e)
failedSyncs.push(`...${contractID.slice(-5)} failed sync with '${e.message}'`)
console.error(`syncContractsInOrder: failed to sync ${type}(${contractID}):`, e)
failedSyncs.push(`${type}(…${contractID.slice(-5)}) failed sync with '${e.message}'`)
}
}
}
Expand Down

0 comments on commit 6c417b0

Please sign in to comment.