Skip to content

Instantly share code, notes, and snippets.

@tdelam
Created May 10, 2018 00:45
Show Gist options
  • Save tdelam/0dcd6b1e96fa58a53679eb110941d1ef to your computer and use it in GitHub Desktop.
Save tdelam/0dcd6b1e96fa58a53679eb110941d1ef to your computer and use it in GitHub Desktop.
[debug] Simple CORS request from Origin 'http://localhost:3000' is allowed
[debug] Processing by PhoenixChat.UserController.create/2
Parameters: %{"user" => %{"email" => "tdelam@gmail.com", "password" => "[FILTERED]", "username" => "tdelam"}}
Pipelines: [:api]
[info] Sent 500 in 47ms
[error] #PID<0.353.0> running PhoenixChat.Endpoint terminated
Server: localhost:4000 (http)
Request: POST /api/users
** (exit) an exception was raised:
** (FunctionClauseError) no function clause matching in Ecto.Changeset.cast_key/1
(ecto) lib/ecto/changeset.ex:449: Ecto.Changeset.cast_key(["email", "username"])
(ecto) lib/ecto/changeset.ex:414: Ecto.Changeset.process_param/8
(elixir) lib/enum.ex:1397: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(elixir) lib/enum.ex:1397: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(ecto) lib/ecto/changeset.ex:391: Ecto.Changeset.do_cast/7
(phoenix_chat) web/models/user.ex:29: PhoenixChat.User.changeset/2
(phoenix_chat) web/models/user.ex:21: PhoenixChat.User.registration_changeset/2
(phoenix_chat) web/controllers/user_controller.ex:7: PhoenixChat.UserController.create/2
(phoenix_chat) web/controllers/user_controller.ex:1: PhoenixChat.UserController.action/2
(phoenix_chat) web/controllers/user_controller.ex:1: PhoenixChat.UserController.phoenix_controller_pipeline/2
(phoenix_chat) lib/phoenix_chat/endpoint.ex:1: PhoenixChat.Endpoint.instrument/4
(phoenix_chat) lib/phoenix/router.ex:261: PhoenixChat.Router.dispatch/2
(phoenix_chat) web/router.ex:1: PhoenixChat.Router.do_call/2
(phoenix_chat) lib/phoenix_chat/endpoint.ex:1: PhoenixChat.Endpoint.phoenix_pipeline/1
(phoenix_chat) lib/plug/debugger.ex:123: PhoenixChat.Endpoint."call (overridable 3)"/2
(phoenix_chat) lib/phoenix_chat/endpoint.ex:1: PhoenixChat.Endpoint.call/2
(plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4
(cowboy) /Users/trevor/Elixir/phoenix-chat-api/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment