Skip to content

Conversation

@mlichtblau
Copy link
Contributor

Description

Since Exceptions.propagate(e) in OkHttpFluxRequestBody wraps checked IOExceptions in a runtime exception, the original exception is not propagated correctly to okhttp causing missed retries and logging noise.

fixes #47169

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings November 5, 2025 17:13
@github-actions github-actions bot added Azure.Core azure-core Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Nov 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

Thank you for your contribution @mlichtblau! We will review the pull request and get back to you soon.

Copy link
Contributor

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 adds exception unwrapping logic to properly propagate IOException instances that are wrapped in RuntimeException during the request body writing process.

  • Wraps the blocking call to requestSendMono.block() in a try-catch block to handle exceptions
  • Unwraps and re-throws IOException when it's the cause of a caught RuntimeException
  • Ensures IOException is properly propagated to OkHttp as expected by the writeTo method signature

@mlichtblau
Copy link
Contributor Author

@microsoft-github-policy-service agree

@alzimmermsft
Copy link
Member

Thanks for the fix @mlichtblau !

@alzimmermsft alzimmermsft merged commit b5a0397 into Azure:main Nov 11, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure.Core azure-core Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] OkHttpFluxRequestBody does not correctly propagate IOExceptions

2 participants