Skip to content

Commit 6f6cc76

Browse files
committed
fix: export empty encrypted_headers as an empty map
1 parent 1b90bec commit 6f6cc76

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/sequin/transforms/transforms.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,10 @@ defmodule Sequin.Transforms do
403403

404404
defp encrypted_headers(%HttpEndpoint{encrypted_headers: nil}), do: %{}
405405

406+
defp encrypted_headers(%HttpEndpoint{encrypted_headers: encrypted_headers})
407+
when is_map(encrypted_headers) and map_size(encrypted_headers) == 0,
408+
do: %{}
409+
406410
defp encrypted_headers(%HttpEndpoint{encrypted_headers: encrypted_headers}) do
407411
"(#{map_size(encrypted_headers)} encrypted header(s)) - sha256sum: #{sha256sum(encrypted_headers)}"
408412
end

0 commit comments

Comments
 (0)