Sha256: 78b5d42d3786c911f07b2dd4884803316a5d9db141b625201bcc97db688ae963

Contents?: true

Size: 287 Bytes

Versions: 10

Compression:

Stored size: 287 Bytes

Contents

require 'rest-core/middleware/error_detector'

class RestCore::ErrorDetectorHttp < RestCore::ErrorDetector
  def self.members; [:error_detector]; end
  include RestCore::Middleware

  def initialize app
    super(app, lambda{ |env| (env[RESPONSE_STATUS] || 200) / 100 >= 4 })
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rest-core-0.8.0 lib/rest-core/middleware/error_detector_http.rb
rest-core-0.7.2 lib/rest-core/middleware/error_detector_http.rb
rest-core-0.7.0 lib/rest-core/middleware/error_detector_http.rb
rest-core-0.4.0 lib/rest-core/middleware/error_detector_http.rb
rest-core-0.4.0.pre.2 lib/rest-core/middleware/error_detector_http.rb
rest-core-0.4.0.pre.1 lib/rest-core/middleware/error_detector_http.rb
rest-core-0.4.0.pre.0 lib/rest-core/middleware/error_detector_http.rb
rest-core-0.3.0 lib/rest-core/middleware/error_detector_http.rb
rest-core-0.3.0.pre.2 lib/rest-core/middleware/error_detector_http.rb
rest-core-0.3.0.pre.1 lib/rest-core/middleware/error_detector_http.rb