Sha256: e93c70a7c7053eb44e9e6072829b0a14e8a313a3843b5a250afc6a7a5d3833da

Contents?: true

Size: 275 Bytes

Versions: 1

Compression:

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

1 entries across 1 versions & 1 rubygems

Version Path
moo_moo-0.2.0 lib/moo_moo/middleware/open_srs_errors.rb