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

support-empty-requests-and-responses #405

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nicksanford
Copy link

No description provided.

@nicksanford nicksanford force-pushed the support-empty-requests-and-responses branch from 29b308f to e53c334 Compare February 10, 2025 01:57
@nicksanford nicksanford force-pushed the support-empty-requests-and-responses branch from e53c334 to ae8f152 Compare February 10, 2025 01:58
@nicksanford nicksanford marked this pull request as draft February 10, 2025 02:02
@@ -70,6 +69,8 @@ defmodule GRPC.Server.Transcode do
Map.get(response_body, key)
end

def map_response_body(%{}, response_body), do: 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.

This doesn't match on an empty map. It matches on any map. You need to use when map_size(arg) == 0

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, please add tests for this

@sleipnir
Copy link
Collaborator

@nicksanford @polvalente I was wondering why this was necessary. Can you explain it to me?

@polvalente
Copy link
Contributor

@nicksanford @polvalente I was wondering why this was necessary. Can you explain it to me?

I was hoping to discover when reading the test case I requested 😅

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.

3 participants