Sha256: 7bef27f5fa8050bc361befd8f659a0d48a4f3e943de3b5ef196ec52bd2c87e2e
Contents?: true
Size: 418 Bytes
Versions: 1
Compression:
Stored size: 418 Bytes
Contents
# frozen_string_literal: true require 'faraday' require 'ivapi/error' module Ivapi # Faraday response middleware module Response # This class raises an exception based HTTP status codes returned # by the API. class RaiseError < Faraday::Response::Middleware def on_complete(response) error = Ivapi::Error.from_response(response) raise error if error end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ivapi-1.9.0 | lib/ivapi/response/raise_error.rb |