Sha256: c52714ec6f225245cda3c46e353b280cd234ce1ef6f451395be9bcfe53042978

Contents?: true

Size: 273 Bytes

Versions: 10

Compression:

Stored size: 273 Bytes

Contents

module MooMoo
  class OpenSRSErrors < Faraday::Response::Middleware
    def on_complete(env)
      # Checks for invalid http status
      unless (200..299).include?(env[:status])
        raise OpenSRSException, "Bad HTTP Status: #{env[:status]}"
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
moo_moo-0.12.0 lib/moo_moo/middleware/open_srs_errors.rb
moo_moo-0.11.0 lib/moo_moo/middleware/open_srs_errors.rb
moo_moo-0.10.0 lib/moo_moo/middleware/open_srs_errors.rb
moo_moo-0.9.0 lib/moo_moo/middleware/open_srs_errors.rb
moo_moo-0.8.0 lib/moo_moo/middleware/open_srs_errors.rb
moo_moo-0.7.0 lib/moo_moo/middleware/open_srs_errors.rb
moo_moo-0.6.0 lib/moo_moo/middleware/open_srs_errors.rb
moo_moo-0.5.0 lib/moo_moo/middleware/open_srs_errors.rb
moo_moo-0.4.0 lib/moo_moo/middleware/open_srs_errors.rb
moo_moo-0.3.0 lib/moo_moo/middleware/open_srs_errors.rb