@@ -51,15 +51,16 @@ func (r *reconciler) ensureSchema(ctx context.Context, cache cache.Cache, export
5151 schemas := make ([]* kubebindv1alpha2.BoundSchema , 0 , len (export .Spec .Resources ))
5252
5353 for _ , res := range export .Spec .Resources {
54- schema , err := r .getBoundSchema (ctx , cache , export .Namespace , res .ResourceGroupName ())
54+ name := res .ResourceGroupName ()
55+ schema , err := r .getBoundSchema (ctx , cache , export .Namespace , name )
5556 if err != nil {
5657 if errors .IsNotFound (err ) {
5758 conditions .MarkFalse (
5859 export ,
5960 kubebindv1alpha2 .APIServiceExportConditionProviderInSync ,
6061 "BoundSchemaMissing" ,
6162 conditionsapi .ConditionSeverityError ,
62- "BoundSchemas are not available: %v" , schema . Name )
63+ "BoundSchema %q is not available: %v" , name , err )
6364 return nil
6465 }
6566 return err
@@ -68,7 +69,10 @@ func (r *reconciler) ensureSchema(ctx context.Context, cache cache.Cache, export
6869 schemas = append (schemas , schema )
6970 }
7071
71- hash := helpers .BoundSchemasSpecHash (schemas )
72+ hash , err := helpers .BoundSchemasSpecHash (schemas )
73+ if err != nil {
74+ return err
75+ }
7276
7377 if export .Annotations [kubebindv1alpha2 .SourceSpecHashAnnotationKey ] != hash {
7478 // both exist, update APIServiceExport
0 commit comments