Make request/response info available in `OpenAIException` when available
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 1.5k
- Forks
- 264
- Avg merge
- 9h 46m
- Merged PRs (30d)
- 96
Description
In case an exception is thrown I want to write in my log file as much as possible, to debug it later: including HTTP response headers!
It is great that .headers() are available in OpenAIServiceException.
Good.
Now make .headers() available in OpenAIInvalidDataException, OpenAIIoException, OpenAIException.
HTTP response headers are extremely important!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating OpenAIServiceException, OpenAIInvalidDataException, OpenAIIoException, and OpenAIException, then trace how response headers are currently preserved in the service exception. Done means headers are available on each of the three named exception types when an HTTP response provides them, without losing existing exception behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100