{"record":{"id":"f06e6285e93724b3","repo":"sipeed/picoclaw","slug":"failed-to-save-config-v","errorCode":null,"errorMessage":"Failed to save config: %v","messagePattern":"Failed to save config: (.+?)","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"web/backend/api/config.go","lineNumber":105,"sourceCode":"\terr = cfg.SecurityCopyFrom(h.configPath)\n\tif err != nil {\n\t\thttp.Error(w, fmt.Sprintf(\"Failed to apply security config: %v\", err), http.StatusInternalServerError)\n\t\treturn\n\t}\n\tapplyConfigSecretsFromMap(&cfg, raw)\n\n\tif errs := validateConfig(&cfg); len(errs) > 0 {\n\t\tw.Header().Set(\"Content-Type\", \"application/json\")\n\t\tw.WriteHeader(http.StatusBadRequest)\n\t\tjson.NewEncoder(w).Encode(map[string]any{\n\t\t\t\"status\": \"validation_error\",\n\t\t\t\"errors\": errs,\n\t\t})\n\t\treturn\n\t}\n\n\tif err := config.SaveConfig(h.configPath, &cfg); err != nil {\n\t\thttp.Error(w, fmt.Sprintf(\"Failed to save config: %v\", err), http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\th.applyRuntimeLogLevel()\n\tlogger.Infof(\"configuration updated successfully\")\n\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tjson.NewEncoder(w).Encode(map[string]string{\"status\": \"ok\"})\n}\n\nfunc execAllowRemoteOmitted(body []byte) bool {\n\tvar raw struct {\n\t\tTools *struct {\n\t\t\tExec *struct {\n\t\t\t\tAllowRemote *bool `json:\"allow_remote\"`\n\t\t\t} `json:\"exec\"`\n\t\t} `json:\"tools\"`\n\t}","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/web/backend/api/config.go#L87-L123","documentation":"Error \"Failed to save config: %v\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at web/backend/api/config.go:105 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}