Sha256: 71ce69810848e0343c644fcf840b220a294ebe15b6ce23c711a15d124e59f3eb

Contents?: true

Size: 589 Bytes

Versions: 161

Compression:

Stored size: 589 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

161 entries across 161 versions & 1 rubygems

Version Path
appsignal-1.4.0.beta.1 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.3.6 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.3.6.beta.1 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.3.5 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.3.5.beta.1 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.3.4 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.3.3 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.4.0.alpha.2 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.4.0.alpha.1 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.3.2 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.3.1 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.3.0 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.3.0.beta.3 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.3.0.beta.2 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.3.0.beta.1 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.2.5 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.2.4 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.2.4.beta.4 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.2.4.beta.3 lib/appsignal/rack/js_exception_catcher.rb
appsignal-1.2.4.beta.2 lib/appsignal/rack/js_exception_catcher.rb