OpenAPITools / OpenAPITools/openapi-generator
[BUG] [csharp] DefaultExceptionFactory hides exceptions
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
The openapi-generator creates this ExceptionFactory:
First of all, I'm not sure handling response codes as exceptions is good practice, but that could be debated.
However, what's much worse is that real exceptions are hidden - in case a timeout occurs, or the connection is closed etc., all I get is a null response instead of the real exception.
Am I missing something? How are other people handling this?
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 with the linked samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/Configuration.cs around lines 48-62 and trace how generated clients handle transport failures. Determine why timeouts or closed connections result in a null response instead of the underlying exception. Done means the expected exception behavior is defined and verified for the generated C# client.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100