fix: properly reject promises on error