Exception: Relaxo::QueryServer::InvalidRequestError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/relaxo/query_server/designer.rb

Overview

Indicates that the request was invalid for some reason (e.g. lacking appropriate authentication)

Instance Method Summary collapse

Instance Method Details

#initilize(message, code = 400, details = {}) ⇒ Object



44
45
46
47
48
49
# File 'lib/relaxo/query_server/designer.rb', line 44

def initilize(message, code = 400, details = {})
	super message
	
	@code = 400
	@details = details
end

#to_responseObject

Returns a response suitable for passing back to the client.



52
53
54
# File 'lib/relaxo/query_server/designer.rb', line 52

def to_response
	@details.merge(:code => @code)
end