added exceptions in case of API errors + properly caching nil results