Promise rejections have code now for better error handling