No stack trace in production log

Thank you, @andrewf, the ErrorView approach that you suggested saved me a bunch of time.

I was seeing Converted error Ecto.Query.CastError to 400 response errors in the log, and Instrumenting template_not_found() to log the call stack was a major time-saver in my investigation. Thank you!

  def template_not_found(template, _assigns) do
    Logger.error("OMG OMG OMG: #{inspect(assigns.reason)}, stack: #{inspect(assigns.stack)}")
    Phoenix.Controller.status_message_from_template(template)
  end
1 Like