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

  1. Read the body text — it names the exact invalid field/value
  2. Fix the offending config field and re-submit
  3. Verify the target daemon version matches the config schema you are pushing (syncthing cli show system -> version)
  4. 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

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


AI-assisted analysis of syncthing/syncthing@058bcd7334 (2026-08-15). Data as JSON: /api/errors/d60794e288b0673f. Report an issue: GitHub.