Module: Sequencescape::Api::BasicErrorHandling

Included in:
Sequencescape::Api, Associations::BelongsTo::AssociationProxy::LoadHandler, FinderMethods::AllHandler, FinderMethods::FindByUuidHandler, ModifyingHandler, PageOfResults::UpdateHandler, Search::BaseHandler
Defined in:
lib/sequencescape-api/errors.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) missing(json)

Raises:

  • (Sequencescape::Api::ResourceNotFound)


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

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

- (Object) redirection(json) {|_self| ... }

Yields:

  • (_self)

Yield Parameters:



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

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

- (Object) unauthenticated(json)

Raises:

  • (Sequencescape::Api::UnauthenticatedError)


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

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