Rewritten withPayload and withClue to handle Failed and Canceled separately.