diff options
Diffstat (limited to 'config/puma.rb.example')
-rw-r--r-- | config/puma.rb.example | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/config/puma.rb.example b/config/puma.rb.example index d664986174b..65c817bb2d8 100644 --- a/config/puma.rb.example +++ b/config/puma.rb.example @@ -81,15 +81,10 @@ log_formatter do |str| json_formatter.call(str) end -lowlevel_error_handler do |ex, env| - if Raven.configuration.capture_allowed? - Raven.capture_exception(ex, tags: { 'handler': 'puma_low_level' }, extra: { puma_env: env }) - end +require_relative "/home/git/gitlab/lib/gitlab/puma/error_handler" - if Sentry.configuration.sending_allowed? - Sentry.capture_exception(ex, tags: { 'handler': 'puma_low_level' }, extra: { puma_env: env }) - end +error_handler = Gitlab::Puma::ErrorHandler.new(ENV['RAILS_ENV'] == 'production') - # note the below is just a Rack response - [500, {}, ["An error has occurred and reported in the system's low-level error handler."]] +lowlevel_error_handler do |ex, env, status_code| + error_handler.execute(ex, env, status_code) end |