lib/pactas_itero/error.rb
# Returns the appropriate PactasItero::Error sublcass based
# on status and response message
#
# @param [Hash] response HTTP response
# @return [PactasItero::Error]
Returns the appropriate PactasItero::Error sublcass based
on status and response message
Returns the appropriate PactasItero :: Error sublcass based on status and response message
def build_error_message
      return nil if @response.nil?
      message =  "#{@response[:method].to_s.upcase} "
      message << redact_url(@response[:url].to_s) + ": "
      message << "#{@response[:status]} - "
      message << "#{response_message}" unless response_message.nil?
      message << "#{response_error}" unless response_error.nil?
      message << "#{response_error_summary}" unless response_error_summary.nil?
      message
    end
def build_error_message return nil if @response . nil? message = "#{@response[:method].to_s.upcase} " message << redact_url ( @response [ :url ] . to_s ) + ": " message << "#{@response[:status]} - " message << "#{response_message}" unless response_message . nil? message << "#{response_error}" unless response_error . nil? message << "#{response_error_summary}" unless response_error_summary . nil? message end
Returns the appropriate PactasItero::Error sublcass based
on status and response message
Returns the appropriate PactasItero :: Error sublcass based on status and response message
None
PactasItero::Error
<not_specific>
response HTTP response
response HTTP response