Module: ActiveCall::RequestErrorable
- Extended by:
- ActiveSupport::Concern
- Included in:
- RequestError
- Defined in:
- lib/active_call/concerns/request_errorable.rb
Instance Method Summary collapse
Instance Method Details
#initialize(response = nil, errors = ActiveModel::Errors.new(self), message = nil) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/active_call/concerns/request_errorable.rb', line 10 def initialize(response = nil, errors = ActiveModel::Errors.new(self), = nil) @response = response @errors = errors ||= errors..to_sentence.presence || 'Request failed' super() end |