Exception: SnapSearch::ValidationException

Inherits:
Exception
  • Object
show all
Defined in:
lib/snap_search/validation_exception.rb

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(response_content) ⇒ ValidationException

Raise a new ValidationException



9
10
11
12
13
# File 'lib/snap_search/validation_exception.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