Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/provider/destination_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (d *destinationDataSource) Read(ctx context.Context, req datasource.ReadReq
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Destination",
fmt.Sprintf("Unable to read Destination (ID: %s)", state.ID.ValueString()),
getError(err, body),
)

Expand Down
6 changes: 3 additions & 3 deletions internal/provider/destination_filter_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (r *destinationFilterResource) Read(ctx context.Context, req resource.ReadR
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Destination Filter",
fmt.Sprintf("Unable to read Destination Filter (ID: %s)", previousState.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -271,7 +271,7 @@ func (r *destinationFilterResource) Update(ctx context.Context, req resource.Upd
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to update Destination Filter",
fmt.Sprintf("Unable to update Destination Filter (ID: %s)", state.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -314,7 +314,7 @@ func (r *destinationFilterResource) Delete(ctx context.Context, req resource.Del
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to delete Destination Filter",
fmt.Sprintf("Unable to delete Destination Filter (ID: %s)", state.ID.ValueString()),
getError(err, body),
)

Expand Down
4 changes: 2 additions & 2 deletions internal/provider/destination_metadata_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ func (d *destinationMetadataDataSource) Read(ctx context.Context, req datasource
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Source metadata",
fmt.Sprintf("Unable to read Source metadata (ID: %s)", state.ID.ValueString()),
getError(err, body),
)

Expand All @@ -412,7 +412,7 @@ func (d *destinationMetadataDataSource) Read(ctx context.Context, req datasource
err = state.Fill(destinationMetadata)
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Source metadata",
fmt.Sprintf("Unable to read Source metadata (ID: %s)", state.ID.ValueString()),
err.Error(),
)

Expand Down
6 changes: 3 additions & 3 deletions internal/provider/destination_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ func (r *destinationResource) Read(ctx context.Context, req resource.ReadRequest
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Destination",
fmt.Sprintf("Unable to read Destination (ID: %s)", previousState.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -650,7 +650,7 @@ func (r *destinationResource) Update(ctx context.Context, req resource.UpdateReq
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to update Destination",
fmt.Sprintf("Unable to update Destination (ID: %s)", plan.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -695,7 +695,7 @@ func (r *destinationResource) Delete(ctx context.Context, req resource.DeleteReq
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to delete Destination",
fmt.Sprintf("Unable to delete Destination (ID: %s)", state.ID.ValueString()),
getError(err, body),
)

Expand Down
8 changes: 4 additions & 4 deletions internal/provider/destination_subscription_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (r *destinationSubscriptionResource) Create(ctx context.Context, req resour
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to update Destination subscription",
fmt.Sprintf("Unable to update Destination subscription (ID: %s)", plan.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -229,7 +229,7 @@ func (r *destinationSubscriptionResource) Read(ctx context.Context, req resource
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Destination subscription",
fmt.Sprintf("Unable to read Destination subscription (ID: %s)", previousState.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -312,7 +312,7 @@ func (r *destinationSubscriptionResource) Update(ctx context.Context, req resour
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to update Destination subscription",
fmt.Sprintf("Unable to update Destination subscription (ID: %s)", plan.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -353,7 +353,7 @@ func (r *destinationSubscriptionResource) Delete(ctx context.Context, req resour
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to delete Destination subscription",
fmt.Sprintf("Unable to delete Destination subscription (ID: %s)", config.ID.ValueString()),
getError(err, body),
)

Expand Down
6 changes: 3 additions & 3 deletions internal/provider/function_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (r *functionResource) Read(ctx context.Context, req resource.ReadRequest, r
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Function",
fmt.Sprintf("Unable to read Function (ID: %s)", previousState.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -247,7 +247,7 @@ func (r *functionResource) Update(ctx context.Context, req resource.UpdateReques
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to update Function",
fmt.Sprintf("Unable to update Function (ID: %s)", plan.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -284,7 +284,7 @@ func (r *functionResource) Delete(ctx context.Context, req resource.DeleteReques
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to delete Function",
fmt.Sprintf("Unable to delete Function (ID: %s)", config.ID.ValueString()),
getError(err, body),
)

Expand Down
6 changes: 3 additions & 3 deletions internal/provider/insert_function_instance_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (r *insertFunctionInstanceResource) Read(ctx context.Context, req resource.
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Insert Function instance",
fmt.Sprintf("Unable to read Insert Function instance (ID: %s)", previousState.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -227,7 +227,7 @@ func (r *insertFunctionInstanceResource) Update(ctx context.Context, req resourc
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to update Insert Function instance",
fmt.Sprintf("Unable to update Insert Function instance (ID: %s)", plan.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -271,7 +271,7 @@ func (r *insertFunctionInstanceResource) Delete(ctx context.Context, req resourc
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to delete Insert Function instance",
fmt.Sprintf("Unable to delete Insert Function instance (ID: %s)", config.ID.ValueString()),
getError(err, body),
)

Expand Down
6 changes: 3 additions & 3 deletions internal/provider/profiles_warehouse_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (r *profilesWarehouseResource) Read(ctx context.Context, req resource.ReadR
warehouse, err := findProfileWarehouse(r.authContext, r.client, previousState.ID.ValueString(), previousState.SpaceID.ValueString())
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Profiles Warehouse",
fmt.Sprintf("Unable to read Profiles Warehouse (ID: %s)", previousState.ID.ValueString()),
err.Error(),
)

Expand Down Expand Up @@ -240,7 +240,7 @@ func (r *profilesWarehouseResource) Update(ctx context.Context, req resource.Upd
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to update Profiles Warehouse",
fmt.Sprintf("Unable to update Profiles Warehouse (ID: %s)", plan.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -283,7 +283,7 @@ func (r *profilesWarehouseResource) Delete(ctx context.Context, req resource.Del
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to delete Profiles Warehouse",
fmt.Sprintf("Unable to delete Profiles Warehouse (ID: %s)", config.ID.ValueString()),
getError(err, body),
)

Expand Down
6 changes: 3 additions & 3 deletions internal/provider/reverse_etl_model_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (r *reverseETLModelResource) Read(ctx context.Context, req resource.ReadReq
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Reverse ETL model",
fmt.Sprintf("Unable to read Reverse ETL model (ID: %s)", previousState.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -222,7 +222,7 @@ func (r *reverseETLModelResource) Update(ctx context.Context, req resource.Updat
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to update Reverse ETL model",
fmt.Sprintf("Unable to update Reverse ETL model (ID: %s)", plan.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -264,7 +264,7 @@ func (r *reverseETLModelResource) Delete(ctx context.Context, req resource.Delet
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to delete Reverse ETL model",
fmt.Sprintf("Unable to delete Reverse ETL model (ID: %s)", config.ID.ValueString()),
getError(err, body),
)

Expand Down
4 changes: 2 additions & 2 deletions internal/provider/role_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (d *roleDataSource) Read(ctx context.Context, req datasource.ReadRequest, r
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Role",
fmt.Sprintf("Unable to read Role (ID: %s)", config.ID.ValueString()),
getError(err, body),
)

Expand All @@ -100,7 +100,7 @@ func (d *roleDataSource) Read(ctx context.Context, req datasource.ReadRequest, r
role, err := findRole(out.Data.Roles, id)
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Role",
fmt.Sprintf("Unable to read Role (ID: %s)", config.ID.ValueString()),
err.Error(),
)

Expand Down
4 changes: 2 additions & 2 deletions internal/provider/source_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ func (d *sourceDataSource) Read(ctx context.Context, req datasource.ReadRequest,
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to Read Source",
fmt.Sprintf("Unable to Read Source (ID: %s)", config.ID.ValueString()),
getError(err, body),
)

Expand All @@ -302,7 +302,7 @@ func (d *sourceDataSource) Read(ctx context.Context, req datasource.ReadRequest,
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Source schema settings",
fmt.Sprintf("Unable to read Source schema settings (ID: %s)", config.ID.ValueString()),
getError(err, body),
)

Expand Down
2 changes: 1 addition & 1 deletion internal/provider/source_metadata_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (d *sourceMetadataDataSource) Read(ctx context.Context, req datasource.Read
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Source metadata",
fmt.Sprintf("Unable to read Source metadata (ID: %s)", state.ID.ValueString()),
getError(err, body),
)

Expand Down
10 changes: 5 additions & 5 deletions internal/provider/source_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ func (r *sourceResource) Create(ctx context.Context, req resource.CreateRequest,
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to update Source after creation",
fmt.Sprintf("Unable to update Source after creation (ID: %s)", plan.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -388,7 +388,7 @@ func (r *sourceResource) Read(ctx context.Context, req resource.ReadRequest, res
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Source",
fmt.Sprintf("Unable to read Source (ID: %s)", previousState.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -454,7 +454,7 @@ func (r *sourceResource) Update(ctx context.Context, req resource.UpdateRequest,
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Source before update",
fmt.Sprintf("Unable to read Source before update (ID: %s)", plan.ID.ValueString()),
getError(err, body),
)

Expand All @@ -479,7 +479,7 @@ func (r *sourceResource) Update(ctx context.Context, req resource.UpdateRequest,
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to update Source",
fmt.Sprintf("Unable to update Source (ID: %s)", plan.ID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -546,7 +546,7 @@ func (r *sourceResource) Delete(ctx context.Context, req resource.DeleteRequest,
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to delete Source",
fmt.Sprintf("Unable to delete Source (ID: %s)", config.ID.ValueString()),
getError(err, body),
)

Expand Down
10 changes: 5 additions & 5 deletions internal/provider/source_tracking_plan_connection_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (r *sourceTrackingPlanConnectionResource) Create(ctx context.Context, req r
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to update Source schema settings",
fmt.Sprintf("Unable to update Source schema settings (ID: %s)", plan.SourceID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -256,7 +256,7 @@ func (r *sourceTrackingPlanConnectionResource) Read(ctx context.Context, req res
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Source",
fmt.Sprintf("Unable to read Source (ID: %s)", previousState.SourceID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -284,7 +284,7 @@ func (r *sourceTrackingPlanConnectionResource) Read(ctx context.Context, req res
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Source schema settings",
fmt.Sprintf("Unable to read Source schema settings (ID: %s)", previousState.SourceID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -321,7 +321,7 @@ func (r *sourceTrackingPlanConnectionResource) Update(ctx context.Context, req r
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Source",
fmt.Sprintf("Unable to read Source (ID: %s)", plan.SourceID.ValueString()),
getError(err, body),
)

Expand Down Expand Up @@ -357,7 +357,7 @@ func (r *sourceTrackingPlanConnectionResource) Update(ctx context.Context, req r
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to update Source schema settings",
fmt.Sprintf("Unable to update Source schema settings (ID: %s)", plan.SourceID.ValueString()),
getError(err, body),
)

Expand Down
4 changes: 2 additions & 2 deletions internal/provider/tracking_plan_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (d *trackingPlanDataSource) Read(ctx context.Context, req datasource.ReadRe
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Tracking Plan",
fmt.Sprintf("Unable to read Tracking Plan (ID: %s)", config.ID.ValueString()),
getError(err, body),
)

Expand All @@ -158,7 +158,7 @@ func (d *trackingPlanDataSource) Read(ctx context.Context, req datasource.ReadRe
}
if err != nil {
resp.Diagnostics.AddError(
"Unable to read Tracking Plan rules",
fmt.Sprintf("Unable to read Tracking Plan rules (ID: %s)", config.ID.ValueString()),
getError(err, body),
)

Expand Down
Loading
Loading