diff --git a/pkg/controller/acmechallenges/sync.go b/pkg/controller/acmechallenges/sync.go index bec056b50..ee8166244 100644 --- a/pkg/controller/acmechallenges/sync.go +++ b/pkg/controller/acmechallenges/sync.go @@ -224,16 +224,15 @@ func (c *Controller) syncChallengeStatus(ctx context.Context, cl acmecl.Interfac // TODO: should we validate the State returned by the ACME server here? cmState := cmapi.State(acmeChallenge.Status) - if cmState == cmapi.Invalid { - // be nice to our users and check if there is an error that we - // can tell them about in the reason field - // TODO(dmo): problems may be compound and they may be tagged with - // a type field that suggests changes we should make (like provisioning - // an account). We might be able to handle errors more gracefully using - // this info - if acmeChallenge.Error != nil { - ch.Status.Reason = acmeChallenge.Error.Detail - } + // be nice to our users and check if there is an error that we + // can tell them about in the reason field + // TODO(dmo): problems may be compound and they may be tagged with + // a type field that suggests changes we should make (like provisioning + // an account). We might be able to handle errors more gracefully using + // this info + ch.Status.Reason = "" + if acmeChallenge.Error != nil { + ch.Status.Reason = acmeChallenge.Error.Detail } ch.Status.State = cmState diff --git a/pkg/controller/acmeorders/sync.go b/pkg/controller/acmeorders/sync.go index 64dd66c38..3b09f5fe3 100644 --- a/pkg/controller/acmeorders/sync.go +++ b/pkg/controller/acmeorders/sync.go @@ -452,16 +452,15 @@ func buildChallenge(i int, o *cmapi.Order, chalSpec cmapi.ChallengeSpec) *cmapi. func (c *Controller) setOrderStatus(o *cmapi.OrderStatus, acmeOrder *acmeapi.Order) { // TODO: should we validate the State returned by the ACME server here? cmState := cmapi.State(acmeOrder.Status) - if cmState == cmapi.Invalid { - // be nice to our users and check if there is an error that we - // can tell them about in the reason field - // TODO(dmo): problems may be compound and they may be tagged with - // a type field that suggests changes we should make (like provisioning - // an account). We might be able to handle errors more gracefully using - // this info - if acmeOrder.Error != nil { - o.Reason = acmeOrder.Error.Detail - } + // be nice to our users and check if there is an error that we + // can tell them about in the reason field + // TODO(dmo): problems may be compound and they may be tagged with + // a type field that suggests changes we should make (like provisioning + // an account). We might be able to handle errors more gracefully using + // this info + o.Reason = "" + if acmeOrder.Error != nil { + o.Reason = acmeOrder.Error.Detail } c.setOrderState(o, cmState)