fix: keep abra working if recipe catalogue is offline #235

Merged
moritz merged 2 commits from moritz/abra:main into main 2022-12-13 14:42:56 +00:00
Showing only changes of commit d6a8abad00 - Show all commits

View File

@ -712,15 +712,18 @@ func ReadRecipeCatalogue() (RecipeCatalogue, error) {
recipeFSIsLatest, err := recipeCatalogueFSIsLatest()
if err != nil {
return nil, err
logrus.Error(err)
logrus.Error("failed to access last recipe catalogue")
}
if !recipeFSIsLatest {
if err := readRecipeCatalogueWeb(&recipes); err != nil {
return nil, err
}
logrus.Error(err)
logrus.Error("failed to access web recipe catalogue")
} else {
return recipes, nil
}
}
if err := readRecipeCatalogueFS(&recipes); err != nil {
return nil, err