{"record":{"id":"ae818aaafb3e346c","repo":"multica-ai/multica","slug":"unexpected-status-d","errorCode":null,"errorMessage":"unexpected status %d","messagePattern":"unexpected status (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_daemon.go","lineNumber":1342,"sourceCode":"}\n\n// requestDaemonShutdown POSTs to the daemon's /shutdown endpoint to ask it\n// to exit gracefully. Returns an error if the request could not be delivered\n// (network error, non-2xx status, or the endpoint predates this change).\nfunc requestDaemonShutdown(healthPort int) error {\n\turl := fmt.Sprintf(\"http://127.0.0.1:%d/shutdown\", healthPort)\n\treq, err := http.NewRequest(http.MethodPost, url, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\tclient := &http.Client{Timeout: 2 * time.Second}\n\tresp, err := client.Do(req)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer resp.Body.Close()\n\tif resp.StatusCode < 200 || resp.StatusCode >= 300 {\n\t\treturn fmt.Errorf(\"unexpected status %d\", resp.StatusCode)\n\t}\n\treturn nil\n}\n\n// --- daemon status ---\n\nfunc runDaemonStatus(cmd *cobra.Command, _ []string) error {\n\tprofile := resolveProfile(cmd)\n\thealthPort, err := daemonStatusHealthPort(cmd)\n\tif err != nil {\n\t\treturn err\n\t}\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\n\t// Safe to list profiles here: daemonStatusHealthPort already rejected an\n\t// explicit --profile inside a daemon-managed task.\n\tif err := requireKnownProfile(profile); err != nil {\n\t\tvar unknown *unknownProfileError","sourceCodeStart":1324,"sourceCodeEnd":1360,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_daemon.go#L1324-L1360","documentation":"Error \"unexpected status %d\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_daemon.go:1342 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the daemon/server versions for compatibility; inspect the unexpected status code."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}