Closed jaimeiniesta closed 3 years ago
Some lesson URLs are raising an error:
https://beta.elixirschool.com/ru/ecto/querying_basics
[error] #PID<0.18017.0> running SchoolHouseWeb.Endpoint (connection #PID<0.18016.0>, stream id 1) terminated Server: elixirschool-jaime.ngrok.io:80 (http) Request: GET /ru/ecto/querying_basics ** (exit) an exception was raised: ** (ArithmeticError) bad argument in arithmetic expression (school_house 0.1.0) lib/school_house/lessons.ex:113: SchoolHouse.Lessons.populate_surrounding_lessons/1 (school_house 0.1.0) lib/school_house/lessons.ex:48: SchoolHouse.Lessons.get/3 (school_house 0.1.0) lib/school_house_web/controllers/lesson_controller.ex:16: SchoolHouseWeb.LessonController.lesson/2 (school_house 0.1.0) lib/school_house_web/controllers/lesson_controller.ex:1: SchoolHouseWeb.LessonController.action/2 (school_house 0.1.0) lib/school_house_web/controllers/lesson_controller.ex:1: SchoolHouseWeb.LessonController.phoenix_controller_pipeline/2 (phoenix 1.5.9) lib/phoenix/router.ex:352: Phoenix.Router.__call__/2 (school_house 0.1.0) lib/school_house_web/endpoint.ex:1: SchoolHouseWeb.Endpoint.plug_builder_call/2 (school_house 0.1.0) lib/school_house_web/endpoint.ex:3: anonymous fn/3 in SchoolHouseWeb.Endpoint."call (overridable 3)"/2 (appsignal 2.1.7) lib/appsignal/instrumentation.ex:10: Appsignal.Instrumentation.instrument/1 (school_house 0.1.0) lib/plug/debugger.ex:136: SchoolHouseWeb.Endpoint."call (overridable 4)"/2 (school_house 0.1.0) lib/school_house_web/endpoint.ex:1: SchoolHouseWeb.Endpoint."call (overridable 5)"/2 (school_house 0.1.0) lib/plug/error_handler.ex:65: SchoolHouseWeb.Endpoint.call/2 (phoenix 1.5.9) lib/phoenix/endpoint/cowboy2_handler.ex:65: Phoenix.Endpoint.Cowboy2Handler.init/4 (cowboy 2.9.0) /Users/jaime/code/elixirschool/school_house/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2 (cowboy 2.9.0) /Users/jaime/code/elixirschool/school_house/deps/cowboy/src/cowboy_stream_h.erl:306: :cowboy_stream_h.execute/3 (cowboy 2.9.0) /Users/jaime/code/elixirschool/school_house/deps/cowboy/src/cowboy_stream_h.erl:295: :cowboy_stream_h.request_process/3 (stdlib 3.14.2) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
The fix for this is now included in #127
Resolved in #127
Some lesson URLs are raising an error:
https://beta.elixirschool.com/ru/ecto/querying_basics