Add failure prevention in the error uri generator