Sha256: 8c532af786c6c0be0fcc87fb19647c7d404006eb1172f67ca460291b2931493f
Contents?: true
Size: 530 Bytes
Versions: 11
Compression:
Stored size: 530 Bytes
Contents
# frozen_string_literal: true 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 |response| response.body = ::Epics::Response.new(@client, response.body) raise(Epics::Error::TechnicalError, response.body.technical_code) if response.body.technical_error? raise(Epics::Error::BusinessError, response.body.business_code) if response.body.business_error? end end end
Version data entries
11 entries across 11 versions & 1 rubygems