Improve error message when TestServer finishes with a pending request read#17164
Conversation
| } | ||
| catch (Exception ex) | ||
| { | ||
| throw new InvalidOperationException("An error occurred when completing the request. Request delegate may have finished while there is a pending read of the request body.", ex); |
There was a problem hiding this comment.
What's the inner exception type and message in this scenario?
There was a problem hiding this comment.
System.InvalidOperationException: Reading is already in progress.
I didn't want to completely throw away the original exception in case there is some scenario where an exception is thrown for a different reason.
There was a problem hiding this comment.
I'm not sure this is a substantial improvement. The exception type doesn't change, and the new message can't say with any confidence how to fix the problem.
Was there an issue associated with this PR? Was the IOE even reported to the client/test or was it swallowed internally?
There was a problem hiding this comment.
Issue: grpc/grpc-dotnet#658
The current error isn't descriptive of the problem and how the developer could fix it.
Make it more obvious what the developer has done wrong.