@@ -48,7 +48,7 @@ func (r *Loader) staticRender(ctx context.Context, db database.Store) (*staticRe
4848},
4949// Always use the default, since we used to assume the empty string
5050Value :previewtypes .StringLiteral (it .DefaultValue ),
51- Diagnostics :nil ,
51+ Diagnostics :make (previewtypes. Diagnostics , 0 ) ,
5252}
5353
5454if it .ValidationError != "" || it .ValidationRegex != "" || it .ValidationMonotonic != "" {
@@ -82,7 +82,15 @@ func (r *Loader) staticRender(ctx context.Context, db database.Store) (*staticRe
8282}
8383
8484var protoOptions []* sdkproto.RichParameterOption
85- _ = json .Unmarshal (it .Options ,& protoOptions )// Not going to make this fatal
85+ err := json .Unmarshal (it .Options ,& protoOptions )
86+ if err != nil {
87+ param .Diagnostics = append (param .Diagnostics ,& hcl.Diagnostic {
88+ Severity :hcl .DiagError ,
89+ Summary :"Failed to parse json parameter options" ,
90+ Detail :err .Error (),
91+ })
92+ }
93+
8694for _ ,opt := range protoOptions {
8795param .Options = append (param .Options ,& previewtypes.ParameterOption {
8896Name :opt .Name ,
@@ -97,7 +105,7 @@ func (r *Loader) staticRender(ctx context.Context, db database.Store) (*staticRe
97105// for a given set of conditions.
98106_ ,param .FormType ,_ = provider .ValidateFormType (provider .OptionType (param .Type ),len (param .Options ),param .FormType )
99107
100- param .Diagnostics = previewtypes .Diagnostics (param .Valid (param .Value ))
108+ param .Diagnostics = append ( param . Diagnostics , previewtypes .Diagnostics (param .Valid (param .Value )) ... )
101109params = append (params ,param )
102110}
103111