Exception: OpenReceive::Server::ValidationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/openreceive/server/errors.rb

Overview

400 — the request body/params were malformed or violated a contract rule.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = "Invalid request.") ⇒ ValidationError

Returns a new instance of ValidationError.



28
29
30
31
32
# File 'lib/openreceive/server/errors.rb', line 28

def initialize(message = "Invalid request.")
  super(message)
  @status = 400
  @code = "INVALID_REQUEST"
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



26
27
28
# File 'lib/openreceive/server/errors.rb', line 26

def code
  @code
end

#statusObject (readonly)

Returns the value of attribute status.



26
27
28
# File 'lib/openreceive/server/errors.rb', line 26

def status
  @status
end