syncthing/syncthing · error
{HTTP response body}
Error message
{HTTP response body} What it means
Produced by the CLI config command when POSTing an updated configuration to system/config returns any non-200 status; the raw HTTP response body is surfaced as the error text. The daemon rejected the submitted config — most often a validation failure (invalid folder/device values) reported in the body.
Source
Thrown at cmd/syncthing/cli/config.go:149
return nil
}
if reflect.DeepEqual(h.cfg, h.original) {
return nil
}
body, err := json.MarshalIndent(h.cfg, "", " ")
if err != nil {
return err
}
resp, err := h.client.Post("system/config", string(body))
if err != nil {
return err
}
if resp.StatusCode != http.StatusOK {
body, err := responseToBArray(resp)
if err != nil {
return err
}
return errors.New(string(body))
}
return nil
}
View on GitHub (pinned to 058bcd7334)
Solutions
- Read the body text — it names the exact invalid field/value
- Fix the offending config field and re-submit
- Verify the target daemon version matches the config schema you are pushing (syncthing cli show system -> version)
- Check the API key if the body hints at authorization (401)
Defensive patterns
Strategy: try-catch
Try / catch
err := applyConfig(cfg)
if err != nil {
// err.Error() is the daemon's validation body: surface it verbatim to the operator
return fmt.Errorf("daemon rejected config: %w", err)
} Prevention
- Validate config against the target version's schema before pushing (syncthing cli config dry checks)
- Push configs only between same-version instances
- Always capture and display the response body — it names the bad field
When it happens
Trigger: 'syncthing cli config diff | syncthing cli config apply'-style flows, or any PutJSON to system/config where the submitted XML/JSON violates config validation on the running daemon (bad folder path, duplicate IDs, invalid interval values), or the API key/CSRF path was wrong (401/403).
Common situations: Applying a config edited for a different syncthing version with new/renamed fields; scripts pushing configs between nodes with mismatched versions; submitting a folder whose path does not exist on the target.
Related errors
- Both --gui-address and --gui-apikey should be specified
- could not find GUI Address
- could not find GUI API key
- invalid endpoint or API call
- invalid API key
AI-assisted analysis of syncthing/syncthing@058bcd7334 (2026-08-15).
Data as JSON: /api/errors/d60794e288b0673f.
Report an issue: GitHub.