getProfiles: Better logging; don't let promise propagate
This commit is contained in:
parent
83e0e5d33b
commit
a39e46db5c
7 changed files with 49 additions and 12 deletions
|
@ -142,10 +142,17 @@ export async function routineProfileRefresh({
|
|||
);
|
||||
successCount += 1;
|
||||
} catch (err) {
|
||||
log.error(
|
||||
`${logId}: refreshed profile for ${conversation.idForLogging()}`,
|
||||
Errors.toLogFormat(err)
|
||||
);
|
||||
if ('code' in err) {
|
||||
log.warn(
|
||||
`${logId}: refreshed profile for ${conversation.idForLogging()},`,
|
||||
`got error code ${err.code}`
|
||||
);
|
||||
} else {
|
||||
log.error(
|
||||
`${logId}: refreshed profile for ${conversation.idForLogging()}`,
|
||||
Errors.toLogFormat(err)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue