I’m new to Phoenix and Elixir. I recently got involved in a Phoenix api project which was build ages ago. It has the following versions:
- Phoenix 1.3.0.
- Elixir 1.5.1
I follow the instructions provided by the previous developer and tried to run the project. However I can’t install the older version of Elixir and Erlang to test the api. It left me to upgrade the phoenix project to 1.6.15. I followed @chrismccord guide and also followed [phoenixdiff](https://phoenixdiff.org/?source=1.3.0&source_variant=default&target=1.6.15&target_variant=default) and successfully migrated and ran the server.
Upon running the server, I ran into so many problems. If I tried to access the any endpoints, I run into 500 Internal Server Error. Not sure what is exactly going on and unable to figure It out how to debug the code and so. Sorry for being a newbie.
Any help on what maybe wrong and why am I getting the Error code: 500? Any helping hands?
[info] GET /api/me
[debug] Processing with Pxrfd.Web.UserController.me/2
Parameters: %{}
Pipelines: [:api]
[info] Sent 500 in 120ms
[error] #PID<0.988.0> running Pxrfd.Web.Endpoint (connection #PID<0.987.0>, stream id 1) terminated
Server: localhost:8000 (http)
Request: GET /api/me
** (exit) an exception was raised:
** (FunctionClauseError) no function clause matching in Keyword.get/3
(elixir 1.14.2) lib/keyword.ex:388: Keyword.get(:default, :key, nil)
(guardian 2.3.1) lib/guardian/plug.ex:373: Guardian.Plug.fetch_key/2
(guardian 2.3.1) lib/guardian/plug.ex:141: Guardian.Plug.current_resource/2
(pxrfd 0.1.0) lib/pxrfd/web/controllers/load_resource.ex:30: Pxrfd.Plug.LoadResource.call/2
(pxrfd 0.1.0) Pxrfd.Web.Router.api/2
(pxrfd 0.1.0) lib/pxrfd/web/router.ex:1: Pxrfd.Web.Router.__pipe_through1__/1
(phoenix 1.6.15) lib/phoenix/router.ex:346: Phoenix.Router.__call__/2
(pxrfd 0.1.0) lib/plug/error_handler.ex:80: Pxrfd.Web.Router."call (overridable 3)"/2
(pxrfd 0.1.0) lib/pxrfd/web/router.ex:1: Pxrfd.Web.Router.call/2
(pxrfd 0.1.0) lib/pxrfd/web/endpoint.ex:1: Pxrfd.Web.Endpoint.plug_builder_call/2
(pxrfd 0.1.0) lib/pxrfd/web/endpoint.ex:1: Pxrfd.Web.Endpoint."call (overridable 3)"/2
(pxrfd 0.1.0) lib/pxrfd/web/endpoint.ex:1: Pxrfd.Web.Endpoint.call/2
(phoenix 1.6.15) lib/phoenix/endpoint/cowboy2_handler.ex:54:






















