Class: SequenceServer::DatabaseUnreachableError

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

Overview

DatabaseUnreachableError is raised when the serialised Job object is refering to a database that is not present in the current filesystem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(more_info) ⇒ DatabaseUnreachableError

Returns a new instance of DatabaseUnreachableError.



10
11
12
13
# File 'lib/sequenceserver/api_errors.rb', line 10

def initialize(more_info)
  super
  @more_info = more_info
end

Instance Attribute Details

#more_infoObject (readonly)

Returns the value of attribute more_info.



8
9
10
# File 'lib/sequenceserver/api_errors.rb', line 8

def more_info
  @more_info
end

Instance Method Details

#http_statusObject



15
16
17
# File 'lib/sequenceserver/api_errors.rb', line 15

def http_status
  422
end

#messageObject



23
24
25
26
27
# File 'lib/sequenceserver/api_errors.rb', line 23

def message
  "The action you're trying to perform is not possible because \
    the database is unreachable. This can happen if the database has \
    been deleted or you are performing an action on an imported job."
end

#titleObject



19
20
21
# File 'lib/sequenceserver/api_errors.rb', line 19

def title
  'Sequence database unreachable'
end