magus v0.4.3 is out. See what's new
¶ View markdown source · ✎ Suggest an edit
1 min read

MGS9023: invalid request

The server answered 400 invalid argument because the route could not act on what the request carried. The message names the field or value to change.

[MGS9023] unknown target "biuld"; run `magus describe targets` to list them
  see: .../MGS9023.md

Why

Each /api/v1/ route validates before it reads anything. The refusals share this code because they share one fix, changing the request:

  • A body that does not parse. The route takes JSON of one shape, and the message names it.
  • A missing or malformed parameter. A path, a line range, a snapshot identity, a lens depth.
  • A name the workspace does not have. A target, a figure focus, an op.
  • A file the route will not serve. A path that escapes the workspace, is not a regular file, or is over the 1 MiB context cap (413).
  • A figure too large to draw. The figure module refused it, and its own text names the lens to narrow (422).

Resolution

Change the request as the message says and send it again. A route that names a target points to magus describe targets for the list.

What this is not

  • Not a state conflict. A well-formed request that contradicts current state is MGS9025.
  • Not a missing thing. A well-formed request naming something the server does not hold is MGS9024.
  • Not a token or share request. Those are MGS9021 and MGS9020.
MGS9023apirequestvalidation400413422
Last updated (8b20a199)
Earlier changes on this page (1)

Full history ↗ · Blame source ↗

Glossary

Workspace

The magus root directory that owns a set of projects and shared config; the unit magus operates over. See workspace.

Target

A named operation (build, test, ...) you invoke with magus run <target>; it may compose a spell's tool-native operations and depend on other targets. See targets.

Op

A single tool-native command a target composes (long form: operation); the middle of the work hierarchy (Spell to Op to Target). See operations.

Module

A magus stdlib namespace a magusfile imports for host capabilities: filesystem, exec, vcs, and more. See the module reference.

Server

The background process a person starts with magus server start. It serves MCP, the console, background jobs and the warm knowledge graph, and adopts nested magus calls into one pool. See server.

Snapshot

A point-in-time view of live state (the pool's occupancy or a tick of exported metrics), as opposed to accumulated history. See server.

Run

One target executing under one magus invocation, such as magus run test web or magus affected ci. A run keeps its captured output behind an output reference. Every magus run is a run whether or not any job asked for it; see Job for how the two relate.

Conventions

This page uses none of the site's convention markers. The full set is on the conventions page.