diff --git a/changelog.d/816.bugfix b/changelog.d/816.bugfix new file mode 100644 index 000000000..4f753e4d1 --- /dev/null +++ b/changelog.d/816.bugfix @@ -0,0 +1 @@ +Fix feed metrics treating request failures as parsing failures. diff --git a/src/feeds/FeedReader.ts b/src/feeds/FeedReader.ts index c2760cad3..46ccadb2c 100644 --- a/src/feeds/FeedReader.ts +++ b/src/feeds/FeedReader.ts @@ -240,7 +240,7 @@ export class FeedReader { this.queue.push({ eventName: 'feed.entry', sender: 'FeedReader', data: entry }); } - if (seenEntriesChanged) { + if (seenEntriesChanged && newGuids.length) { await this.storage.storeFeedGuids(url, ...newGuids); } diff --git a/src/feeds/parser.rs b/src/feeds/parser.rs index 3d33a74e7..0dcbc7d16 100644 --- a/src/feeds/parser.rs +++ b/src/feeds/parser.rs @@ -226,10 +226,13 @@ pub async fn js_read_feed(url: String, options: ReadFeedOptions) -> Result Err(JsError::new( Status::Unknown, - format!("Failed to fetch feed due to HTTP {}", status), + format!("Failed to fetch feed due to HTTP status {}", status), )), } } - Err(err) => Err(JsError::new(Status::Unknown, err)), + Err(err) => Err(JsError::new( + Status::Unknown, + format!("Failed to fetch feed due to HTTP error {}", err), + )), } }