openai-node icon indicating copy to clipboard operation
openai-node copied to clipboard

Pass through fetch error messages in APIConnectionError

Open cnaples79 opened this issue 3 months ago • 0 comments

Summary

  • include the underlying fetch error message when constructing APIConnectionError
  • assert the network error test surfaces the original message in addition to the error type

Rationale

  • fixes openai/openai-node#1656 so callers receive the full connection failure details instead of the generic "Connection error"

Changes

  • update the retry logic to pass the error message into APIConnectionError
  • extend the streaming network error test to check the message is preserved

Fixes #1656

cnaples79 avatar Sep 25 '25 01:09 cnaples79