Sha256: 083ad9c82f771b7996d61d5dcd329f9398afff14867d80f5f8205e3b595d620e

Contents?: true

Size: 253 Bytes

Versions: 37

Compression:

Stored size: 253 Bytes

Contents

require 'rest-core/middleware/error_detector'

class RestCore::ErrorDetectorHttp < RestCore::ErrorDetector
  def initialize app, detector=nil
    super(app, detector ||
               lambda{ |env| (env[RESPONSE_STATUS] || 200) / 100 >= 4 })
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
rest-core-3.1.1 lib/rest-core/middleware/error_detector_http.rb
rest-core-3.1.0 lib/rest-core/middleware/error_detector_http.rb
rest-core-3.0.0 lib/rest-core/middleware/error_detector_http.rb
rest-core-2.1.2 lib/rest-core/middleware/error_detector_http.rb
rest-core-2.1.1 lib/rest-core/middleware/error_detector_http.rb
rest-core-2.1.0 lib/rest-core/middleware/error_detector_http.rb
rest-core-2.0.4 lib/rest-core/middleware/error_detector_http.rb
rest-core-2.0.3 lib/rest-core/middleware/error_detector_http.rb
rest-core-2.0.2 lib/rest-core/middleware/error_detector_http.rb
rest-core-2.0.1 lib/rest-core/middleware/error_detector_http.rb
rest-core-2.0.0 lib/rest-core/middleware/error_detector_http.rb
rest-core-1.0.3 lib/rest-core/middleware/error_detector_http.rb
rest-core-1.0.2 lib/rest-core/middleware/error_detector_http.rb
rest-core-1.0.1 lib/rest-core/middleware/error_detector_http.rb
rest-core-1.0.0 lib/rest-core/middleware/error_detector_http.rb
rest-core-0.8.2 lib/rest-core/middleware/error_detector_http.rb
rest-core-0.8.1 lib/rest-core/middleware/error_detector_http.rb