Skip to content

Conversation

@cavanaug
Copy link
Contributor

Fixes for occasional errors related to streaming responses & minor docs updates for formatting

cavanaug and others added 4 commits June 12, 2025 13:43
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
@jmdaly jmdaly requested a review from Copilot June 12, 2025 23:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@jmdaly jmdaly self-assigned this Jun 15, 2025
@jmdaly jmdaly merged commit 5b99b3c into jmdaly:main Jun 15, 2025
5 checks passed
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.

2 participants