Skip to content

Commit

Permalink
hack in some debug
Browse files Browse the repository at this point in the history
  • Loading branch information
julz committed Aug 16, 2021
1 parent 5b069f2 commit 27cd6f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (ac *reconciler) mutate(ctx context.Context, req *admissionv1.AdmissionRequ
newDecoder.DisallowUnknownFields()
}
if err := newDecoder.Decode(&newObj); err != nil {
return nil, fmt.Errorf("cannot decode incoming new object: %w", err)
return nil, fmt.Errorf("cannot decode incoming new object: %w\noriginal:\n%#v", err, string(newBytes))
}
}
if len(oldBytes) != 0 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (ac *reconciler) decodeRequestAndPrepareContext(
newDecoder.DisallowUnknownFields()
}
if err := newDecoder.Decode(&newObj); err != nil {
return ctx, nil, fmt.Errorf("cannot decode incoming new object: %w", err)
return ctx, nil, fmt.Errorf("cannot decode incoming new object: %w\noriginal:\n%#v", err, newObj)
}
}

Expand Down

0 comments on commit 27cd6f8

Please sign in to comment.