Last active
May 6, 2022 22:19
-
-
Save chadjemmett/9c97de7de9018149b46da99ef5df178f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[info] POST /api/price | |
[debug] Processing with HomeworkWeb.PricesController.create/2 | |
Parameters: %{"_json" => [%{"amount" => 500, "category" => "Sell", "type" => "P"}]} | |
Pipelines: [:api] | |
[info] Sent 400 in 10ms | |
[debug] ** (Phoenix.ActionClauseError) no function clause matching in HomeworkWeb.PricesController.create/2 | |
The following arguments were given to HomeworkWeb.PricesController.create/2: | |
# 1 | |
%Plug.Conn{adapter: {Plug.Cowboy.Conn, :...}, assigns: %{}, before_send: [#Function<0.23023616/1 in Plug.Telemetry.call/2>], body_params: %{"_json" => [%{"amount" => 500, "category" => "Sell", "type" => "P"}]}, cookies: %{}, halted: false, host: "localhost", method: "POST", owner: #PID<0.597.0>, params: %{"_json" => [%{"amount" => 500, "category" => "Sell", "type" => "P"}]}, path_info: ["api", "price"], path_params: %{}, port: 8000, private: %{HomeworkWeb.Router => {[], %{}}, :phoenix_action => :create, :phoenix_controller => HomeworkWeb.PricesController, :phoenix_endpoint => HomeworkWeb.Endpoint, :phoenix_format => "json", :phoenix_layout => {HomeworkWeb.LayoutView, :app}, :phoenix_request_logger => {"request_logger", "request_logger"}, :phoenix_router => HomeworkWeb.Router, :phoenix_view => HomeworkWeb.PricesView, :plug_session_fetch => #Function<1.77458138/1 in Plug.Session.fetch_session/1>}, query_params: %{}, query_string: "", remote_ip: {127, 0, 0, 1}, req_cookies: %{}, req_headers: [{"accept", "*/*"}, {"accept-encoding", "gzip, deflate, br"}, {"connection", "keep-alive"}, {"content-length", "65"}, {"content-type", "application/json"}, {"host", "localhost:8000"}, {"postman-token", "d5cef312-5fac-43bc-a72d-9330f308dc1b"}, {"user-agent", "PostmanRuntime/7.26.8"}], request_path: "/api/price", resp_body: nil, resp_cookies: %{}, resp_headers: [{"cache-control", "max-age=0, private, must-revalidate"}, {"x-request-id", "FuyjT6d9YEjJwpIAAADC"}], scheme: :http, script_name: [], secret_key_base: :..., state: :unset, status: nil} | |
# 2 | |
%{"_json" => [%{"amount" => 500, "category" => "Sell", "type" => "P"}]} | |
(homework 0.1.0) lib/homework_web/controllers/prices_controller.ex:14: HomeworkWeb.PricesController.create(%Plug.Conn{adapter: {Plug.Cowboy.Conn, :...}, assigns: %{}, before_send: [#Function<0.23023616/1 in Plug.Telemetry.call/2>], body_params: %{"_json" => [%{"amount" => 500, "category" => "Sell", "type" => "P"}]}, cookies: %{}, halted: false, host: "localhost", method: "POST", owner: #PID<0.597.0>, params: %{"_json" => [%{"amount" => 500, "category" => "Sell", "type" => "P"}]}, path_info: ["api", "price"], path_params: %{}, port: 8000, private: %{HomeworkWeb.Router => {[], %{}}, :phoenix_action => :create, :phoenix_controller => HomeworkWeb.PricesController, :phoenix_endpoint => HomeworkWeb.Endpoint, :phoenix_format => "json", :phoenix_layout => {HomeworkWeb.LayoutView, :app}, :phoenix_request_logger => {"request_logger", "request_logger"}, :phoenix_router => HomeworkWeb.Router, :phoenix_view => HomeworkWeb.PricesView, :plug_session_fetch => #Function<1.77458138/1 in Plug.Session.fetch_session/1>}, query_params: %{}, query_string: "", remote_ip: {127, 0, 0, 1}, req_cookies: %{}, req_headers: [{"accept", "*/*"}, {"accept-encoding", "gzip, deflate, br"}, {"connection", "keep-alive"}, {"content-length", "65"}, {"content-type", "application/json"}, {"host", "localhost:8000"}, {"postman-token", "d5cef312-5fac-43bc-a72d-9330f308dc1b"}, {"user-agent", "PostmanRuntime/7.26.8"}], request_path: "/api/price", resp_body: nil, resp_cookies: %{}, resp_headers: [{"cache-control", "max-age=0, private, must-revalidate"}, {"x-request-id", "FuyjT6d9YEjJwpIAAADC"}], scheme: :http, script_name: [], secret_key_base: :..., state: :unset, status: nil}, %{"_json" => [%{"amount" => 500, "category" => "Sell", "type" => "P"}]}) | |
(homework 0.1.0) lib/homework_web/controllers/prices_controller.ex:1: HomeworkWeb.PricesController.action/2 | |
(homework 0.1.0) lib/homework_web/controllers/prices_controller.ex:1: HomeworkWeb.PricesController.phoenix_controller_pipeline/2 | |
(phoenix 1.5.4) lib/phoenix/router.ex:352: Phoenix.Router.__call__/2 | |
(homework 0.1.0) lib/homework_web/endpoint.ex:1: HomeworkWeb.Endpoint.plug_builder_call/2 | |
(homework 0.1.0) lib/plug/debugger.ex:132: HomeworkWeb.Endpoint."call (overridable 3)"/2 | |
(homework 0.1.0) lib/homework_web/endpoint.ex:1: HomeworkWeb.Endpoint.call/2 | |
(phoenix 1.5.4) lib/phoenix/endpoint/cowboy2_handler.ex:65: Phoenix.Endpoint.Cowboy2Handler.init/4 | |
(cowboy 2.8.0) /Users/cjem/projects/elixir/web-homework/elixir/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2 | |
(cowboy 2.8.0) /Users/cjem/projects/elixir/web-homework/elixir/deps/cowboy/src/cowboy_stream_h.erl:300: :cowboy_stream_h.execute/3 | |
(cowboy 2.8.0) /Users/cjem/projects/elixir/web-homework/elixir/deps/cowboy/src/cowboy_stream_h.erl:291: :cowboy_stream_h.request_process/3 | |
(stdlib 3.16.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment