Class: SequenceServer::InvalidParameterError

Inherits:
ValidationError
  • Object
show all
Defined in:
lib/sequenceserver/api_errors.rb

Overview

InvalidParameterError is a more generic error class that can be raised when the frontend sends a request with an invalid parameter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(more_info) ⇒ InvalidParameterError

Returns a new instance of InvalidParameterError.



60
61
62
63
# File 'lib/sequenceserver/api_errors.rb', line 60

def initialize(more_info)
  super
  @more_info = more_info
end

Instance Attribute Details

#more_infoObject (readonly)

Returns the value of attribute more_info.



58
59
60
# File 'lib/sequenceserver/api_errors.rb', line 58

def more_info
  @more_info
end

Instance Method Details

#http_statusObject



65
66
67
# File 'lib/sequenceserver/api_errors.rb', line 65

def http_status
  422
end

#messageObject



73
74
75
76
# File 'lib/sequenceserver/api_errors.rb', line 73

def message
  "The action you're trying to perform is not possible because \
    one of the provided parameters is invalid."
end

#titleObject



69
70
71
# File 'lib/sequenceserver/api_errors.rb', line 69

def title
  'Invalid parameter'
end