Skip to content

Instantly share code, notes, and snippets.

@noelworden
Last active June 30, 2020 02:50
Show Gist options
  • Select an option

  • Save noelworden/455f481f500117b5ee1218507f5d46cb to your computer and use it in GitHub Desktop.

Select an option

Save noelworden/455f481f500117b5ee1218507f5d46cb to your computer and use it in GitHub Desktop.
def get_message(error) do
converted_opts = Enum.map(error.opts, fn {key, value} ->
{String.to_existing_atom(key), value}
end)
translate_error({"#{error.message}", converted_opts})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment