module Oma::Ruby::Errors

Errors module

Constants

API_ERRORS
HTTP_ERRORS

Public Instance Methods

api_error(code) click to toggle source
# File lib/oma-ruby/errors.rb, line 51
def api_error(code)
  Oma::Ruby::Errors.const_get(API_ERRORS.fetch(code.to_s, 'OpenSRSApiError'))
end
http_error(status) click to toggle source
# File lib/oma-ruby/errors.rb, line 47
def http_error(status)
  Oma::Ruby::Errors.const_get(HTTP_ERRORS.fetch(status.to_s, 'HttpError'))
end