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

Add tests for omitted message in connect error #922

Merged
merged 4 commits into from
Sep 11, 2024
Merged

Add tests for omitted message in connect error #922

merged 4 commits into from
Sep 11, 2024

Conversation

timostamm
Copy link
Member

The "message" property in a Connect Error or EndStreamResponse is optional. This PR adds tests for clients to make sure they are able to parse a response where "message" is omitted.

@@ -83,6 +83,25 @@ testCases:
error:
code: CODE_UNAVAILABLE
message: oops
- request:
testName: error/message-omitted
Copy link
Member

Choose a reason for hiding this comment

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

For consistency with above test case (named missing-code), how about missing-message instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Code is required, but message is optional, so it isn't really missing. Maybe that's splitting hairs... I've renamed to missing-message for consistency, and added a comment explaining it's optional.

Signed-off-by: Timo Stamm <[email protected]>
@jhump jhump merged commit 77c7f1c into connectrpc:main Sep 11, 2024
6 checks passed
@jhump jhump mentioned this pull request Sep 19, 2024
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.

2 participants