Merged
Conversation
fix(llm_github_copilot.py): 🐛 Ensure HTTP error response body is read before accessing its text in HTTPStatusError handlers. This correctly retrieves error messages from chunked or streaming responses.
fix(llm_github_copilot.py): 🐛 Call response.read() before accessing response.text in HTTPStatusError handlers to correctly log error bodies, especially for chunked or streaming responses. ####################################################################### # github_copilot/gemini-2.5-pro # # github_copilot/o4-mini ####################################################################### # fix: 🐛 read error response before text access # # fix(llm_github_copilot.py): 🐛 call e.response.read() before accessing .text in HTTP error handlers to ensure chunked or streaming error bodies are fully loaded # erge branch 'sandbox/streaming'
docs(README.md): 📚 Add bash syntax highlighting, login --help output, and minor formatting
There was a problem hiding this comment.
Pull Request Overview
This PR fixes errors related to streaming responses by ensuring that response bodies are fully read before processing error messages and updates the documentation with clearer code block language annotations.
- Fix error handling in streaming response functions
- Refactor the error message extraction process
- Update README.md formatting for CLI examples
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| llm_github_copilot.py | Improves error handling by reading response bodies before logging |
| README.md | Updates code block language identifiers and minor formatting |
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 for occasional errors related to streaming responses & minor docs updates for formatting