Exception: SnapSearch::ValidationError

Inherits:
Error
  • Object
show all
Defined in:
lib/snap_search/validation_error.rb

Overview

Raised when the parameters of a request from the Client are not valid.

Instance Method Summary collapse

Constructor Details

#initialize(response_content) ⇒ ValidationError

Raise a new ValidationError



9
10
11
12
13
# File 'lib/snap_search/validation_error.rb', line 9

def initialize(response_content)
    error_messages = response_content.values.collect { |message| "    #{message}" }.join("\n")
    
    super("Validation error from SnapSearch. Check your request parameters:\n#{ error_messages }")
end