Sha256: 6fa728447c76921fe3533aebe953a5b5d7a11bfa52dd02cb7e6836311984b517
Contents?: true
Size: 482 Bytes
Versions: 17
Compression:
Stored size: 482 Bytes
Contents
class Epics::ParseEbics < Faraday::Middleware def initialize(app = nil, options = {}) super(app) @client = options[:client] end def call(env) @app.call(env).on_complete do |env| env[:body] = ::Epics::Response.new(@client, env[:body]) raise Epics::Error::TechnicalError.new(env[:body].technical_code) if env[:body].technical_error? raise Epics::Error::BusinessError.new(env[:body].business_code) if env[:body].business_error? end end end
Version data entries
17 entries across 17 versions & 1 rubygems