mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Improve error handling for HTTP client
This commit is contained in:
parent
16c2dc4a8c
commit
dda9114692
5 changed files with 62 additions and 7 deletions
|
@ -33,6 +33,9 @@ func FindSubscriptions(websiteURL string) (Subscriptions, error) {
|
|||
client := http.NewClient(websiteURL)
|
||||
response, err := client.Get()
|
||||
if err != nil {
|
||||
if _, ok := err.(errors.LocalizedError); ok {
|
||||
return nil, err
|
||||
}
|
||||
return nil, errors.NewLocalizedError(errConnectionFailure, err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue