Monitoring Logs: read a log file as text/plain instead of failing content negotiation - #6970
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6968.
The shell api helper (
application-coreapi.js) hardwiredAccept: application/json, whileLogsEndpointdeclaresproduces = "text/plain"forGET /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:logFilerequeststext/plain.🤖 Generated with Claude Code