Skip to content

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