Class: SequenceServer::InvalidSequenceIdError

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

Overview

InvalidSequenceIdError is raised when the FASTA sequence ID provided by the frontend appears to be invalid. It is important to validate the sequence ID format for security reasons.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(more_info) ⇒ InvalidSequenceIdError

Returns a new instance of InvalidSequenceIdError.



36
37
38
39
# File 'lib/sequenceserver/api_errors.rb', line 36

def initialize(more_info)
  super
  @more_info = more_info
end

Instance Attribute Details

#more_infoObject (readonly)

Returns the value of attribute more_info.



34
35
36
# File 'lib/sequenceserver/api_errors.rb', line 34

def more_info
  @more_info
end

Instance Method Details

#http_statusObject



41
42
43
# File 'lib/sequenceserver/api_errors.rb', line 41

def http_status
  422
end

#messageObject



49
50
51
52
# File 'lib/sequenceserver/api_errors.rb', line 49

def message
  "The action you're trying to perform is not possible because \
    one of the FASTA ids seems to be invalid."
end

#titleObject



45
46
47
# File 'lib/sequenceserver/api_errors.rb', line 45

def title
  'Sequence ID invalid'
end