server: AbortError at lower log level
Some checks failed
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test Pipeline failed

AbortErrors happen when a connection times out, which is a quite
common occurrence and not worthy of a warning level log message.
This commit is contained in:
Johann150 2024-01-24 01:16:30 +01:00
parent aac1c40657
commit c504091c61
Signed by: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -58,7 +58,11 @@ deliverQueue
await deletionRefCount(job);
})
.on('failed', async (job, err) => {
deliverLogger.warn(`failed(${err}) ${getJobInfo(job)} to=${job.data.to}`);
if (err.type === 'aborted') {
deliverLogger.debug(`failed(${err}) ${getJobInfo(job)} to=${job.data.to}`);
} else {
deliverLogger.warn(`failed(${err}) ${getJobInfo(job)} to=${job.data.to}`);
}
if (job.attemptsMade >= (job.opts?.attempts ?? 1)) {
// this was the last attempt