cmd/syncthing: Improve "cli debug file" handling

Proper URL encoding, and return a sensible error when it's not found.
This commit is contained in:
Jakob Borg
2021-06-05 11:19:02 +02:00
parent 6494a9332d
commit 0e9d2a13af
3 changed files with 11 additions and 2 deletions
+3
View File
@@ -48,6 +48,9 @@ func indexDumpOutput(url string) cli.ActionFunc {
return err
}
response, err := client.Get(url)
if errors.Is(err, errNotFound) {
return errors.New("not found (debugging disabled or folder/file not in database)")
}
if err != nil {
return err
}