Properly reject promise instead of dying