Skip to content

fix(examples): bound image telephone downloads - #879

Open
Ghraven wants to merge 1 commit into
apache:mainfrom
Ghraven:raven-bound-image-telephone-downloads
Open

fix(examples): bound image telephone downloads#879
Ghraven wants to merge 1 commit into
apache:mainfrom
Ghraven:raven-bound-image-telephone-downloads

Conversation

@Ghraven

@Ghraven Ghraven commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Problem

The image-telephone examples download generated image URLs with requests.get(image_url).content. Without a timeout, the examples can hang indefinitely if the image host stalls. They also write the response body without checking HTTP status, so an error response can be saved as if it were an image.

Before / after

Before, both the base image-telephone example and the Hamilton integration variant used unbounded image downloads and did not call raise_for_status().

After, both examples use a 30 second image download timeout and call raise_for_status() before writing the image bytes. Successful downloads keep the same behavior.

Verification

  • python -m py_compile examples\image-telephone\application.py examples\integrations\hamilton\image-telephone\application.py
  • git diff --check

@github-actions github-actions Bot added the area/examples Relates to /examples label Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/examples Relates to /examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant