Encoding Ecto Validation Errors in Phoenix 1.3 (opens in new tab)
From Mitchell Hanberg's Blog: # Problem I recently ran into this error while implementing the first endpoint of my Phoenix JSON API. After a bit of googling and detective work, I found the offending piece of code, located in my `error_view.ex` file. This function handles rendering the JSON payload that the controller sends back to the client when there is an error. The `errors` property of the `changeset` struct is a keyword list* of `error`'s, with `error` being a type defined in the Changes...
Read the original article