add promises for error