     |> Enum.drop(1)
   end
 
-  defp get_body({:ok, %HTTPoison.Response{status_code: 404}}), do: [status_code: "404", message: "Not found items."]
+  defp get_body({:ok, %HTTPoison.Response{status_code: 404}}), do: error_404
 
   defp get_body({:error, %HTTPoison.Error{reason: reason}}), do: IO.inspect reason
+
+  defp error_404 do
+    Dict.put(%{}, "status_code", "404")
+    |> Dict.put("message", "Not found items.")
+  end
 end


  error case
  ### Not found
  iex> error = %{"message" => "not found.", "status_code" => "404"}
  iex> error[:status_code]
  "404"

  """


  defp get_body_xml({:ok, %HTTPoison.Response{status_code: 200, body: body}}), do: body

  defp get_body_xml({:ok, %HTTPoison.Response{status_code: 404}}), do: error_404

  defp get_body_xml({:error, %HTTPoison.Error{reason: reason}}), do: IO.inspect reason

