miniflux / v2

Minimalist and opinionated feed reader
https://miniflux.app
Apache License 2.0
6.44k stars 702 forks source link

Optimize subscription validation and network error handling during feed addition #2699

Open AiraNadih opened 1 week ago

AiraNadih commented 1 week ago

Description

When adding a feed that already exists in Miniflux, if there is a network issue that prevents the feed from being fetched successfully, Miniflux currently displays an error message. This behavior might be confusing, as it seems more intuitive to first check if the subscription already exists before attempting to fetch it.

Suggested Enhancement

I propose a refactoring of the logic where Miniflux should first verify the existence of a subscription before trying to fetch it. This could prevent unnecessary network requests and provide a clearer user experience, especially in cases where network connectivity is an issue.

Expected Behavior

  1. User attempts to add a feed.
  2. Miniflux checks if the feed URL already exists in the user's subscriptions.
  3. If the feed exists, inform the user that the subscription already exists.
  4. If the feed does not exist, proceed to attempt to fetch and parse the feed.
  5. If a network issue occurs during fetch, handle and report the specific network error without overlapping it with the subscription existence check.

This sequence would ensure that network errors are only addressed if necessary and that users are clearly informed about the state of their subscription attempts.

Additional Context

This enhancement would improve usability by aligning the application's behavior more closely with user expectations and reducing potential frustration caused by unclear error messages during network failures.

Thank you for considering this feature request to enhance the reliability and user-friendliness of Miniflux.