class SwiftypeAppSearch::ClientException
Attributes
errors[R]
Public Class Methods
new(response)
click to toggle source
Calls superclass method
# File lib/swiftype-app-search/exceptions.rb, line 5 def initialize(response) @errors = if response.is_a?(Array) response.flat_map { |r| r['errors'] } else response['errors'] || [response] end message = (errors.count == 1) ? "Error: #{errors.first}" : "Errors: #{errors.inspect}" super(message) end