fs: fix confusing "didn't find section in config file" error

This change decorates the error with the section name not found which
will hopefully save user confusion.

Fixes #8170
This commit is contained in:
Nick Craig-Wood
2025-01-15 16:32:59 +00:00
parent 2c72842c10
commit 5316acd046
5 changed files with 8 additions and 6 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ package googlephotos
import (
"context"
"errors"
"fmt"
"io"
"net/http"
@@ -35,7 +36,7 @@ func TestIntegration(t *testing.T) {
*fstest.RemoteName = "TestGooglePhotos:"
}
f, err := fs.NewFs(ctx, *fstest.RemoteName)
if err == fs.ErrorNotFoundInConfigFile {
if errors.Is(err, fs.ErrorNotFoundInConfigFile) {
t.Skipf("Couldn't create google photos backend - skipping tests: %v", err)
}
require.NoError(t, err)