use error.Is to handle wrapped errors

This commit is contained in:
Gani Georgiev committed 2023-12-04 16:21:57 +02:00
1 parent 0fb859c321
commit 41dcd9b4d4
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -565,7 +565,7 @@ func (app *BaseApp) RefreshSettings() error {
encryptionKey := os.Getenv(app.EncryptionEnv())
storedSettings, err := app.Dao().FindSettings(encryptionKey)
if err != nil && err != sql.ErrNoRows {
if err != nil && !errors.Is(err, sql.ErrNoRows) {
return err
}