Skip to content

Commit 84e11ec

Browse files
authored
chore: return error message (#236)
<!-- markdownlint-disable MD041 --> #### What this PR does / why we need it #### Which issue(s) this PR fixes <!-- Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. -->
1 parent bf48492 commit 84e11ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/controller/deployer/deployer_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Re
233233
var rgd krov1alpha1.ResourceGraphDefinition
234234
// Unmarshal the manifest into the ResourceGraphDefinition object
235235
if err := yaml.Unmarshal(rgdManifest, &rgd); err != nil {
236-
status.MarkNotReady(r.EventRecorder, deployer, deliveryv1alpha1.MarshalFailedReason, "unmarshal failed")
236+
status.MarkNotReady(r.EventRecorder, deployer, deliveryv1alpha1.MarshalFailedReason, err.Error())
237237

238238
return ctrl.Result{}, fmt.Errorf("failed to unmarshal manifest: %w", err)
239239
}
@@ -256,7 +256,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Re
256256
return nil
257257
})
258258
if err != nil {
259-
status.MarkNotReady(r.EventRecorder, deployer, deliveryv1alpha1.CreateOrUpdateFailedReason, "create or update failed")
259+
status.MarkNotReady(r.EventRecorder, deployer, deliveryv1alpha1.CreateOrUpdateFailedReason, err.Error())
260260

261261
return ctrl.Result{}, fmt.Errorf("failed to create or update resource graph definition: %w", err)
262262
}

0 commit comments

Comments
 (0)