Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurred while reading the response. #14

Open
sabmah opened this issue May 16, 2018 · 0 comments
Open

An error occurred while reading the response. #14

sabmah opened this issue May 16, 2018 · 0 comments

Comments

@sabmah
Copy link

sabmah commented May 16, 2018

Hello,
On await restBusClient.GetAsync(uri, requestOptions); , I'm getting an error stating 'An error occurred while reading the response.'
I debugged on this error and it seems like on Line 62 it has problem adding content headers "Expires" as -1. This is the default expire value returned from my REST WebAPI. NOTE: I'm returning ResponseMessageResult as opposed to OK(data) result from my REST WebAPI.

Can I suggest, HttpHeaders.TryAddWithoutValidation(key, value) instead of HttpHeaders.Add(key, value) ?

Also, there is no exception catch on RPCStrategyHelpers.TryGetHttpResponseMessage(packet, out response) Line 176 . It would be nice to see the actual error instead of generic "An error occured while reading the response". Can there be thrown exception?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant