Skip to content

Commit

Permalink
Unwrap metric_data
Browse files Browse the repository at this point in the history
`format_param/1` was not working correctly for nested fields. Each field
was being prefixed with MetricData.member but the inner fields were not
getting their specific prefixes. This caused dimensions to not be sent
correctly.

This fixes #1
  • Loading branch information
Matthew Caldwell committed Jun 7, 2018
1 parent 01f191e commit 5fcbb39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ex_aws/cloudwatch.ex
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,9 @@ defmodule ExAws.Cloudwatch do
end

defp format_param({:metric_data, metric_data}) do
metric_data |> format(prefix: "MetricData.member")
metric_data
|> Enum.flat_map(&format_param/1)
|> ExAws.Utils.format(prefix: "MetricData.member")
end

defp format_param({:ok_actions, ok_actions}) do
Expand Down

0 comments on commit 5fcbb39

Please sign in to comment.