Silence RSS timeouts (#551)

* Silence timeouts

* changelog
This commit is contained in:
Will Hunt 2022-10-31 16:04:52 +00:00 committed by GitHub
parent e178d67781
commit dfad5b5c3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/551.bugfix Normal file
View File

@ -0,0 +1 @@
Don't announce error if a RSS feed request timed out.

View File

@ -33,7 +33,7 @@ export class FeedError extends Error {
return false;
}
}
if (axios.isAxiosError(this.cause) && this.cause.code === 'ECONNRESET') {
if (axios.isAxiosError(this.cause) && this.cause.code && ['ECONNABORTED', 'ECONNRESET'].includes(this.cause.code)) {
// Fuzzy match this, because it's usually a tempoary error.
return true;
}