module Jekyll::Algolia::ErrorHandler
def self.invalid_credentials?(error, _context = {})
_context - Not used
Public: Check if the credentials are working
def self.invalid_credentials?(error, _context = {}) details = error_hash(error.message) return false if details == false if details['message'] != 'Invalid Application-ID or API key' return false end { 'application_id' => details['application_id'], 'index_name' => Configurator.index_name, 'index_object_ids_name' => Configurator.index_object_ids_name } end