Sha256: 5c3b7ce12ccbc1183c455f91189e04e9bd3afca8903220ea69912ab0a7e46654

Contents?: true

Size: 588 Bytes

Versions: 20

Compression:

Stored size: 588 Bytes

Contents

module Appsignal
  module Rack
    class JSExceptionCatcher
      def initialize(app, options = {})
        Appsignal.logger.debug 'Initializing Appsignal::Rack::JSExceptionCatcher'
        @app, @options = app, options
      end

      def call(env)
        if env['PATH_INFO'] == Appsignal.config[:frontend_error_catching_path]
          body        = JSON.parse(env['rack.input'].read)
          transaction = JSExceptionTransaction.new(body)
          transaction.complete!
          return [ 200, {}, []]
        else
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
appsignal-0.11.18 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.17 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.16 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.15 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.14 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.14.beta.1 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.13 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.13.beta.4 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.13.beta.3 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.13.beta.2 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.13.beta.1 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.13.beta.0 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.12 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.11 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.10 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.10.beta.2 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.10.beta.1 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.9 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.8.beta.4 lib/appsignal/rack/js_exception_catcher.rb
appsignal-0.11.8.beta.3 lib/appsignal/rack/js_exception_catcher.rb