read_logs list and read fail: upstream returns string array, not objects #19

Closed
opened 2026-09-19 08:22:22 +01:00 by gronod · 0 comments
Owner

Summary

read_logs list and read both fail with UPSTREAM_SCHEMA_MISMATCH — the upstream /api/v2/System/logs route returns a JSON array of strings (file names), while logsList/logsRead decode []map[string]any.

Environment

  • Binary: deployed darwin-amd64 build from develop @ d047d76, OMBI_BUNDLES=core,administration
  • Ombi: 4.53.10 (https://ombi.i3omb.com), JWT auth

Reproduction

read_logs {"action":"list"}
read_logs {"action":"read","file_id":"deadbeef","limit":5}

Expected

list returns sanitized log file entries (file_id, name); read returns bounded lines for a valid file_id.

Actual

{"code":"UPSTREAM_SCHEMA_MISMATCH","message":"upstream response was not a JSON array: json: cannot unmarshal string into .0 of type map[string]interface {}"}

Both actions fail at the same decode — read never reaches the file-content fetch, so the whole tool is unusable on Ombi 4.53.x.

Cause

decodeArray requires []map[string]any; upstream emits []string. logFileName then never runs. The list handling should accept string elements (each element is itself the file name).

Correlation IDs

f816f164dade353a89ccd1aa (list), 7a9355ea42fad6e2e68a0640 (read)

## Summary `read_logs` `list` and `read` both fail with `UPSTREAM_SCHEMA_MISMATCH` — the upstream `/api/v2/System/logs` route returns a JSON array of **strings** (file names), while `logsList`/`logsRead` decode `[]map[string]any`. ## Environment - Binary: deployed darwin-amd64 build from `develop` @ `d047d76`, `OMBI_BUNDLES=core,administration` - Ombi: 4.53.10 (https://ombi.i3omb.com), JWT auth ## Reproduction ```json read_logs {"action":"list"} read_logs {"action":"read","file_id":"deadbeef","limit":5} ``` ## Expected `list` returns sanitized log file entries (`file_id`, `name`); `read` returns bounded lines for a valid `file_id`. ## Actual ```json {"code":"UPSTREAM_SCHEMA_MISMATCH","message":"upstream response was not a JSON array: json: cannot unmarshal string into .0 of type map[string]interface {}"} ``` Both actions fail at the same decode — `read` never reaches the file-content fetch, so the whole tool is unusable on Ombi 4.53.x. ## Cause `decodeArray` requires `[]map[string]any`; upstream emits `[]string`. `logFileName` then never runs. The list handling should accept string elements (each element is itself the file name). ## Correlation IDs `f816f164dade353a89ccd1aa` (list), `7a9355ea42fad6e2e68a0640` (read)
gronod added this to the M7 — Admin/server wire contracts milestone 2026-09-19 08:57:53 +01:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gronod/ombi-mcp#19