Sha256: 2c6506e9ef725e4d3ccf3111712183be8a2e96138f18533d70e726a763ee6eb5
Contents?: true
Size: 383 Bytes
Versions: 8
Compression:
Stored size: 383 Bytes
Contents
require 'rest-core/middleware' class RestCore::ErrorDetector def self.members; [:error_detector]; end include RestCore::Middleware def call env app.call(env){ |response| detector = error_detector(env) yield( if error = (detector && detector.call(response)) fail(response, error) else response end) } end end
Version data entries
8 entries across 8 versions & 1 rubygems