Problem
The post() helper in internal/syncthing/client.go never checks resp.StatusCode, so any HTTP 4xx/5xx response is silently swallowed as nil:
func (c *Client) post(path string) error {
...
defer resp.Body.Close()
return nil // ← no status check
}
This affects callers:
AddIgnorePattern — silently fails to trigger rescan after writing .stignore
EnsureMeshdFolder — silently fails the post-ignore scan on existing folders
Fix
Mirror the same check used in put() and delete():
if resp.StatusCode >= 400 {
b, _ := io.ReadAll(resp.Body)
return fmt.Errorf("syncthing POST %s: %s — %s", path, resp.Status, b)
}
Problem
The
post()helper ininternal/syncthing/client.gonever checksresp.StatusCode, so any HTTP 4xx/5xx response is silently swallowed asnil:This affects callers:
AddIgnorePattern— silently fails to trigger rescan after writing.stignoreEnsureMeshdFolder— silently fails the post-ignore scan on existing foldersFix
Mirror the same check used in
put()anddelete():