Open asaletnik opened 6 years ago
Furthermore, I have just tried another case - if I use the default show
action or view, and the exception is raised somewhere inside, Airbrake picks it up and then calls the same cell again when sanitizing, causing that exception to be raised again... Inside its rescue block.
I have made a temporary override in the initializer file, and it fixes the issue for me for now, without breaking anything else:
module Cell
class ViewModel
def to_s
if caller[0].match(/airbrake.*sanitize_value/)
super
else
call
end
end
end
end
// Edit - fixes both cases described above.
Hey guys, I'm having some issue with Airbrake and Cells.
Gems used:
The problem occurs when there is exception raised within a Cell that doesn't implement a standard show method or view (named after the cell). Here's the relevant part of the stacktrace:
As you can see Airbrake is picking up the exception, and it goes all the way down to here: https://github.com/airbrake/airbrake-ruby/blob/master/lib/airbrake-ruby/filters/thread_filter.rb#L89
value
passed to sanitize is the Cell that caused the exception, and calling ato_s
on it makes a call on that cell here: https://github.com/trailblazer/cells/blob/master/lib/cell/view_model.rb#L125Now without that
show
method implemented on the cell, it tries to load the template by the cell name, and as it is also missing I get anotherCell::TemplateMissingError
exception raised, within the Airbrake methods, which prevents from reporting the original exception.I have tried adding empty
show
method to my cell and it fixed the problem.But is there any way to make the Airbrake and Cells play nicer? I'm not always using the default
show
action or view...