We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 839050f commit 8eaac00Copy full SHA for 8eaac00
internal/provider/models/reverse_etl_model.go
@@ -1,9 +1,6 @@
1
package models
2
3
import (
4
- "encoding/json"
5
- "errors"
6
-
7
"github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes"
8
"github.com/hashicorp/terraform-plugin-framework/types"
9
"github.com/segmentio/public-api-sdk-go/api"
@@ -48,8 +45,7 @@ func GetScheduleConfig(scheduleConfig api.NullableScheduleConfig) (jsontypes.Nor
48
45
return jsontypes.NewNormalizedNull(), nil
49
46
}
50
47
51
- jsonScheduleConfigString, err := json.Marshal(scheduleConfig)
52
- return jsontypes.NewNormalizedNull(), errors.New(string(jsonScheduleConfigString))
+ jsonScheduleConfigString, err := scheduleConfig.Get().MarshalJSON()
53
if err != nil {
54
return jsontypes.NewNormalizedNull(), err
55
0 commit comments