config :demo, DemoWeb.Endpoint,
render_errors: [
view: DemoWeb.ErrorView,
accepts: ~w(json),
root_layout: false,
layout: false
]
Phoenix.Endpoint has an option called render_errors, you can set root_layout or layout in config.






















