@@ -5,7 +5,6 @@ package proto6server
55
66import (
77 "context"
8-
98 "github.com/hashicorp/terraform-plugin-framework/internal/fromproto6"
109 "github.com/hashicorp/terraform-plugin-framework/internal/fwserver"
1110 "github.com/hashicorp/terraform-plugin-framework/internal/toproto6"
@@ -19,26 +18,41 @@ func (s *Server) ValidateListResourceConfig(ctx context.Context, proto6Req *tfpr
1918 fwResp := & fwserver.ValidateListResourceConfigResponse {}
2019
2120 listResource , diags := s .FrameworkServer .ListResourceType (ctx , proto6Req .TypeName )
21+
22+ fwResp .Diagnostics .Append (diags ... )
23+
2224 if diags .HasError () {
2325 return toproto6 .ValidateListResourceConfigResponse (ctx , fwResp ), nil
2426 }
2527
2628 listResourceSchema , diags := s .FrameworkServer .ListResourceSchema (ctx , proto6Req .TypeName )
29+
30+ fwResp .Diagnostics .Append (diags ... )
31+
2732 if diags .HasError () {
2833 return toproto6 .ValidateListResourceConfigResponse (ctx , fwResp ), nil
2934 }
3035
3136 config , diags := fromproto6 .Config (ctx , proto6Req .Config , listResourceSchema )
37+
38+ fwResp .Diagnostics .Append (diags ... )
39+
3240 if diags .HasError () {
3341 return toproto6 .ValidateListResourceConfigResponse (ctx , fwResp ), nil
3442 }
3543
3644 resourceSchema , diags := s .FrameworkServer .ResourceSchema (ctx , proto6Req .TypeName )
45+
46+ fwResp .Diagnostics .Append (diags ... )
47+
3748 if diags .HasError () {
3849 return toproto6 .ValidateListResourceConfigResponse (ctx , fwResp ), nil
3950 }
4051
4152 identitySchema , diags := s .FrameworkServer .ResourceIdentitySchema (ctx , proto6Req .TypeName )
53+
54+ fwResp .Diagnostics .Append (diags ... )
55+
4256 if diags .HasError () {
4357 return toproto6 .ValidateListResourceConfigResponse (ctx , fwResp ), nil
4458 }
@@ -53,7 +67,7 @@ func (s *Server) ValidateListResourceConfig(ctx context.Context, proto6Req *tfpr
5367
5468 err := s .FrameworkServer .ListResource (ctx , req , stream )
5569 if err != nil {
56- return toproto6 .ValidateListResourceConfigResponse (ctx , fwResp ), err
70+ return toproto6 .ValidateListResourceConfigResponse (ctx , fwResp ), nil
5771 }
5872
5973 fwReq , diags := fromproto6 .ValidateListResourceConfigRequest (ctx , proto6Req , listResource , listResourceSchema )
0 commit comments