omnigraph/crates
Ragnor Comerford 5b19a03003
mr-668: align GET /graphs 405 body code with HTTP status
The single-mode `GET /graphs` handler returned an `ApiError` built
via struct literal with `status: METHOD_NOT_ALLOWED, code: BadRequest`.
The body code disagreed with the HTTP status — clients deserializing
on `code` saw `bad_request`, clients deserializing on `status` saw
405. Same bug class as the earlier 503+Conflict mismatch on the
removed YAML drift path.

Close the class for this one remaining instance:

* Add `ErrorCode::MethodNotAllowed` to the API enum.
* Add `ApiError::method_not_allowed(msg)` — pairs the 405 status
  with the matching code.
* Replace the struct literal in `server_graphs_list` with the
  constructor.
* Regenerate `openapi.json` (adds `method_not_allowed` to the
  ErrorCode schema enum).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 12:04:51 +02:00
..
omnigraph mr-668: comment cleanup and policy format style 2026-05-27 11:57:04 +02:00
omnigraph-cli mr-668: drop actor_id from PolicyRequest; pass actor as separate arg 2026-05-27 12:00:52 +02:00
omnigraph-compiler mr-668: composite e2e tests, race fix, v0.7.0 release (PR 9/10) 2026-05-25 21:32:49 +02:00
omnigraph-policy mr-668: drop actor_id from PolicyRequest; pass actor as separate arg 2026-05-27 12:00:52 +02:00
omnigraph-server mr-668: align GET /graphs 405 body code with HTTP status 2026-05-27 12:04:51 +02:00