Module: Sequencescape::Api::BasicErrorHandling

Instance Method Summary collapse

Instance Method Details

#missing(json) ⇒ Object

Raises:

  • (Sequencescape::Api::ResourceNotFound)


29
30
31
# File 'lib/sequencescape-api/errors.rb', line 29

def missing(json)
  raise Sequencescape::Api::ResourceNotFound, json
end

#redirection(json) {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



33
34
35
# File 'lib/sequencescape-api/errors.rb', line 33

def redirection(json, &block)
  yield(self)
end

#unauthenticated(json) ⇒ Object

Raises:

  • (Sequencescape::Api::UnauthenticatedError)


25
26
27
# File 'lib/sequencescape-api/errors.rb', line 25

def unauthenticated(json)
  raise Sequencescape::Api::UnauthenticatedError, json
end