Skip to content

Monitoring Logs: read a log file as text/plain instead of failing content negotiation - #6970

Merged
delchev merged 1 commit into
masterfrom
fix-monitoring-logs-accept
Aug 27, 2026
Merged

Monitoring Logs: read a log file as text/plain instead of failing content negotiation#6970
delchev merged 1 commit into
masterfrom
fix-monitoring-logs-accept

Conversation

@delchev

@delchev delchev commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Fixes #6968.

The shell api helper (application-core api.js) hardwired Accept: application/json, while LogsEndpoint declares produces = "text/plain" for GET /services/ide/logs/{file} — content negotiation answered 406 before the handler ran, so the monitoring shell's Logs page showed "The file could not be read." for every file (the list endpoint is JSON and worked).

  • api.js: per-call Accept override ({ accept: 'text/plain' }), JSON stays the default for everything else; the success path already falls back to raw text when the body is not JSON.
  • ops.js: logFile requests text/plain.

🤖 Generated with Claude Code

…tent negotiation

The shell api helper hardwired Accept: application/json while
GET /services/ide/logs/{file} produces text/plain, so every file read
answered 406 before the handler ran and the Logs page showed 'The file
could not be read.' for every file. api.js gains a per-call Accept
override ({ accept: ... }, JSON stays the default) and the monitoring
ops.logFile requests text/plain.

Fixes #6968

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@delchev
delchev merged commit b57a84a into master Aug 27, 2026
10 checks passed
@delchev
delchev deleted the fix-monitoring-logs-accept branch August 27, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Monitoring shell Logs: every file fails with 'The file could not be read' (shell api sends Accept: application/json, logs endpoint produces text/plain)

1 participant