this code will run if allSettled failed.