1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Refactor HTTP Client and LocalizedError packages

This commit is contained in:
Frédéric Guillot 2023-10-21 19:50:29 -07:00
parent 120aabfbce
commit 14e25ab9fe
104 changed files with 1277 additions and 10672 deletions

View file

@ -673,9 +673,9 @@ func (h *handler) quickAddHandler(w http.ResponseWriter, r *http.Request) {
return
}
subscriptions, s_err := mfs.FindSubscriptions(url, "", "", "", "", false, false, "")
if s_err != nil {
json.ServerError(w, r, s_err)
subscriptions, localizedError := mfs.FindSubscriptions(url, "", "", "", "", false, false, "")
if localizedError != nil {
json.ServerError(w, r, localizedError.Error())
return
}
@ -746,9 +746,9 @@ func subscribe(newFeed Stream, category Stream, title string, store *storage.Sto
return nil, verr.Error()
}
created, err := mff.CreateFeed(store, userID, &feedRequest)
created, localizedError := mff.CreateFeed(store, userID, &feedRequest)
if err != nil {
return nil, err
return nil, localizedError.Error()
}
if title != "" {