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

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
1 changed files with 5 additions and 1 deletions

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