class SearchKit::Messages

Public Instance Methods

bad_request() click to toggle source
# File lib/search_kit/messages.rb, line 13
def bad_request
  warning(I18n.t('http.400'))
end
json_parse_error(type = 'Argument') click to toggle source
# File lib/search_kit/messages.rb, line 22
def json_parse_error(type = 'Argument')
  message = I18n.t('cli.errors.json_parse', type: type)
  warning(message)
end
no_service() click to toggle source
# File lib/search_kit/messages.rb, line 27
def no_service
  message = I18n.t('cli.errors.no_service', uri: SearchKit.config.app_uri)
  warning(message)
end
not_found(type = 'Resource') click to toggle source
# File lib/search_kit/messages.rb, line 17
def not_found(type = 'Resource')
  message = I18n.t('http.404', type: type)
  warning(message)
end
unauthorized() click to toggle source
# File lib/search_kit/messages.rb, line 9
def unauthorized
  warning(I18n.t('http.401'))
end
unprocessable() click to toggle source
# File lib/search_kit/messages.rb, line 32
def unprocessable
  warning(I18n.t('http.422'))
end
unreadable(error) click to toggle source
# File lib/search_kit/messages.rb, line 36
def unreadable(error)
  warning(I18n.t('cli.errors.unreadable', error: error))
end