Improve error messages when fetching description on babelio

This commit is contained in:
2026-03-24 17:23:06 +01:00
parent 843c5b5dbc
commit 5e6715d586
5 changed files with 11 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ func searchPageIsbn(baseUrl, isbn string) (string, error) {
var searchResults []babelioSearchResult
callapiutils.FetchAndParseResultFromPost(searchUrl, &term, &searchResults)
if len(searchResults) == 0 {
return "", myvalidator.TranslatedError{Err: errors.New("ISBNNotFoundBabelio")}
return "", myvalidator.TranslatedError{Err: errors.New("ISBNNotFoundBabelio"), Arg: isbn}
}
return searchResults[0].Url, nil