Put back in logging for API index calls
Return err if result is null