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

Improve logging message when gRPC status OK in header #1931

Merged
merged 2 commits into from
Nov 3, 2022

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Nov 1, 2022

Fixes #1922

@@ -36,7 +36,8 @@ public async Task ThrowErrorWithOK_ClientThrowsFailedToDeserializeError()
{
SetExpectedErrorsFilter(writeContext =>
{
if (writeContext.State.ToString() == "Message not returned from unary or client streaming call.")
if (writeContext.State.ToString() == "Header contains an OK gRPC status. This is invalid for unary or client streaming calls because a status in the header indicates there is no response body. " +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worthwhile to store this message in a constant for use in the tests and implementation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only place it is used in tests. We're not doing it for anything else so I'd like to leave it as is.

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

Successfully merging this pull request may close these issues.

Handling case where unary call contains a status of OK on success
3 participants