Skip to content

Commit 099347e

Browse files
authored
Fix grammatical errors in error messages regarding identity changes (#1172)
- Updated error message in `server_applyresourcechange_test.go` to correct "then" to "than" in the "Unexpected Identity Change" diagnostic message. - Updated error message in `server_planresourcechange.go` to correct "then" to "than" in the "Unexpected Identity Change" diagnostic message. - Updated error message in `server_planresourcechange_test.go` to correct "then" to "than" in multiple instances of the "Unexpected Identity Change" diagnostic message. - Updated error message in `server_readresource.go` to correct "then" to "than" in the "Unexpected Identity Change" diagnostic message. - Updated error message in `server_readresource_test.go` to correct "then" to "than" in the "Unexpected Identity Change" diagnostic message. - Updated error message in `server_updateresource.go` to correct "then" to "than" in the "Unexpected Identity Change" diagnostic message.
1 parent 7d8104c commit 099347e

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

internal/fwserver/server_applyresourcechange_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1840,7 +1840,7 @@ func TestServerApplyResourceChange(t *testing.T) {
18401840
Diagnostics: diag.Diagnostics{
18411841
diag.NewErrorDiagnostic(
18421842
"Unexpected Identity Change",
1843-
"During the update operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.\n\n"+
1843+
"During the update operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
18441844
"This is always a problem with the provider and should be reported to the provider developer.\n\n"+
18451845
"Planned Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"id-123\">>\n\n"+
18461846
"New Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"new-id-123\">>",

internal/fwserver/server_planresourcechange.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ func (s *Server) PlanResourceChange(ctx context.Context, req *PlanResourceChange
386386
if !req.ResourceBehavior.MutableIdentity && !req.PriorState.Raw.IsNull() && !req.PriorIdentity.Raw.IsNull() && !req.PriorIdentity.Raw.Equal(resp.PlannedIdentity.Raw) {
387387
resp.Diagnostics.AddError(
388388
"Unexpected Identity Change",
389-
"During the planning operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.\n\n"+
389+
"During the planning operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
390390
"This is always a problem with the provider and should be reported to the provider developer.\n\n"+
391391
fmt.Sprintf("Prior Identity: %s\n\n", req.PriorIdentity.Raw.String())+
392392
fmt.Sprintf("Planned Identity: %s", resp.PlannedIdentity.Raw.String()),

internal/fwserver/server_planresourcechange_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4075,7 +4075,7 @@ func TestServerPlanResourceChange(t *testing.T) {
40754075
Diagnostics: diag.Diagnostics{
40764076
diag.NewErrorDiagnostic(
40774077
"Unexpected Identity Change",
4078-
"During the planning operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.\n\n"+
4078+
"During the planning operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
40794079
"This is always a problem with the provider and should be reported to the provider developer.\n\n"+
40804080
"Prior Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"id-123\">>\n\n"+
40814081
"Planned Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"new-id-123\">>",
@@ -6777,7 +6777,7 @@ func TestServerPlanResourceChange(t *testing.T) {
67776777
Diagnostics: diag.Diagnostics{
67786778
diag.NewErrorDiagnostic(
67796779
"Unexpected Identity Change",
6780-
"During the planning operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.\n\n"+
6780+
"During the planning operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
67816781
"This is always a problem with the provider and should be reported to the provider developer.\n\n"+
67826782
"Prior Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"id-123\">>\n\n"+
67836783
"Planned Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"new-id-123\">>",

internal/fwserver/server_readresource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func (s *Server) ReadResource(ctx context.Context, req *ReadResourceRequest, res
188188
if !req.ResourceBehavior.MutableIdentity && !readFollowingImport && !req.CurrentIdentity.Raw.IsNull() && !req.CurrentIdentity.Raw.Equal(resp.NewIdentity.Raw) {
189189
resp.Diagnostics.AddError(
190190
"Unexpected Identity Change",
191-
"During the read operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.\n\n"+
191+
"During the read operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
192192
"This is always a problem with the provider and should be reported to the provider developer.\n\n"+
193193
fmt.Sprintf("Current Identity: %s\n\n", req.CurrentIdentity.Raw.String())+
194194
fmt.Sprintf("New Identity: %s", resp.NewIdentity.Raw.String()),

internal/fwserver/server_readresource_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ func TestServerReadResource(t *testing.T) {
725725
Diagnostics: diag.Diagnostics{
726726
diag.NewErrorDiagnostic(
727727
"Unexpected Identity Change",
728-
"During the read operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.\n\n"+
728+
"During the read operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
729729
"This is always a problem with the provider and should be reported to the provider developer.\n\n"+
730730
"Current Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"id-123\">>\n\n"+
731731
"New Identity: tftypes.Object[\"test_id\":tftypes.String]<\"test_id\":tftypes.String<\"new-id-123\">>",

internal/fwserver/server_updateresource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ func (s *Server) UpdateResource(ctx context.Context, req *UpdateResourceRequest,
189189
if !req.ResourceBehavior.MutableIdentity && !req.PlannedIdentity.Raw.IsNull() && !req.PlannedIdentity.Raw.Equal(resp.NewIdentity.Raw) {
190190
resp.Diagnostics.AddError(
191191
"Unexpected Identity Change",
192-
"During the update operation, the Terraform Provider unexpectedly returned a different identity then the previously stored one.\n\n"+
192+
"During the update operation, the Terraform Provider unexpectedly returned a different identity than the previously stored one.\n\n"+
193193
"This is always a problem with the provider and should be reported to the provider developer.\n\n"+
194194
fmt.Sprintf("Planned Identity: %s\n\n", req.PlannedIdentity.Raw.String())+
195195
fmt.Sprintf("New Identity: %s", resp.NewIdentity.Raw.String()),

0 commit comments

Comments
 (0)