Skip to content

Commit

Permalink
Remove error suppression in render_in
Browse files Browse the repository at this point in the history
We should be able to se error pages, specially in when Rails.env is
development. The piece of code that was removed here
prevented from happening. Instead, it would have the `render_in` method
return `nil` when an error happened, resulting in either a blank page,
or an incomplete page.

I believe we also want to raise errors in production. We should not make
a decision here, whether the error should be suppressed. Otherwise we
are making the assumption "incomplete pages are better than error
pages", which may be the correct assumption under some circumstances,
but not under other circumstances.

Fixes ViewComponent/view_component#1981
  • Loading branch information
mjacobus committed Jan 23, 2024
1 parent 2968b6c commit 3b93d47
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ def render_in_with_tracing(*args)
name: metric_name(self.class.identifier, self.class.name)
)
yield
rescue => e
::NewRelic::Agent.logger.debug('Error capturing ViewComponent segment', e)
ensure
segment&.finish
end
Expand Down

0 comments on commit 3b93d47

Please sign in to comment.