(#1461) - Ensure database is ready before returning from API call