openai-node
openai-node copied to clipboard
Pass through fetch error messages in APIConnectionError
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