multica-ai/multica · error

unexpected status %d

Error message

unexpected status %d

What it means

Error "unexpected status %d" thrown in multica-ai/multica.

Source

Thrown at server/cmd/multica/cmd_daemon.go:1342

}

// requestDaemonShutdown POSTs to the daemon's /shutdown endpoint to ask it
// to exit gracefully. Returns an error if the request could not be delivered
// (network error, non-2xx status, or the endpoint predates this change).
func requestDaemonShutdown(healthPort int) error {
	url := fmt.Sprintf("http://127.0.0.1:%d/shutdown", healthPort)
	req, err := http.NewRequest(http.MethodPost, url, nil)
	if err != nil {
		return err
	}
	client := &http.Client{Timeout: 2 * time.Second}
	resp, err := client.Do(req)
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	if resp.StatusCode < 200 || resp.StatusCode >= 300 {
		return fmt.Errorf("unexpected status %d", resp.StatusCode)
	}
	return nil
}

// --- daemon status ---

func runDaemonStatus(cmd *cobra.Command, _ []string) error {
	profile := resolveProfile(cmd)
	healthPort, err := daemonStatusHealthPort(cmd)
	if err != nil {
		return err
	}
	output, _ := cmd.Flags().GetString("output")

	// Safe to list profiles here: daemonStatusHealthPort already rejected an
	// explicit --profile inside a daemon-managed task.
	if err := requireKnownProfile(profile); err != nil {
		var unknown *unknownProfileError

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Check the daemon/server versions for compatibility; inspect the unexpected status code.

When it happens

Trigger: Thrown at server/cmd/multica/cmd_daemon.go:1342 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/ae818aaafb3e346c. Report an issue: GitHub.