Toolbar.record_event/2 does not pass through callback result when toolbar is disabled
kagux opened this issue · comments
Boris Mikhaylov commented
When toolbar is disabled with the rest of installation configs in place (templates in this case), it raises on template render:
Request: GET /
** (exit) an exception was raised:
** (FunctionClauseError) no function clause matching in Phoenix.Template.HTML.encode_to_iodata!/1
(phoenix) lib/phoenix/template/html.ex:12: Phoenix.Template.HTML.encode_to_iodata!({:error, :toolbar_disabled})
(sylar) lib/sylar/endpoint.ex:1: Sylar.Endpoint.instrument/4
(phoenix) lib/phoenix/controller.ex:646: Phoenix.Controller.do_render/4
(sylar) web/controllers/home_controller.ex:1: Sylar.HomeController.action/2
(sylar) web/controllers/home_controller.ex:1: Sylar.HomeController.phoenix_controller_pipeline/2
(sylar) lib/sylar/endpoint.ex:1: Sylar.Endpoint.instrument/4
(sylar) lib/phoenix/router.ex:261: Sylar.Router.dispatch/2
(sylar) web/router.ex:1: Sylar.Router.do_call/2
(sylar) lib/sylar/endpoint.ex:1: Sylar.Endpoint.phoenix_pipeline/1
(sylar) lib/sylar/endpoint.ex:42: Sylar.Endpoint."call (overridable 2)"/2
(sylar) lib/sylar/endpoint.ex:42: Sylar.Endpoint."call (overridable 3)"/2
(sylar) lib/plug/debugger.ex:123: Sylar.Endpoint."call (overridable 4)"/2
(sylar) lib/sylar/endpoint.ex:1: Sylar.Endpoint.call/2
(plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4
(cowboy) /Users/bmikhayl/Projects/sylar/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4