Open vojtad opened 10 years ago
Sorry I can't replicate it.
I created a bare bones controller app/controllers/users_controller.rb
class UsersController < ApplicationController
def send_message
render stream: true
end
end
added to routes.rb
get '/users/send_message' => 'users#send_message'
with a broken template app/views/users/send_message.html.haml
%h3 Hello
= @user.bad
and received the notification.
Could you try the same and let me know? Perhaps I'm misunderstanding the issue or setup to replicate the bug
Hi, I am sorry for my answering so late, but I was too busy. It still does not work for me. The only difference I see from your setup is that I use erb templates.
However, I believe I have found the source of my problem. Look at
lib/action_view/renderer/streaming_template_renderer.rb
in actionpack gem. It looks like every exception that occures while rendering the response body is rescued in ActionView::StreamingTemplateRenderer.each and then just logged using ActionView::StreamingTemplateRenderer.log_error.
I think this is the source of not logging exception by runtimeerror_notifier. No exception make its way to it up the stack.
However, I think the rendering of response body happens out of the middleware stack, so it is not possible to catch the exception even if it would not be rescued. I currently have no idea how to fix this, do you have any?
Hey, I have noticed, that runtimeerror_notifier does not catch exceptions that occur while rendering page templates when HTTP streaming is enabled for that specific page. When I try to disable HTTP streaming it starts to work. Do you have any idea what could be wrong or how to make it work? I am using Rails 4.0.5 and runtimeerror_notifier 0.0.19.
Here is snippet with exception from heroku logs.