@@ -44,7 +44,8 @@ func (*unsupportedOperation) IsInternalError() {}
44
44
45
45
func (e * unsupportedOperation ) Error () string {
46
46
return fmt .Sprintf (
47
- "internal error: cannot evaluate unsupported %s operation: %s" ,
47
+ "%s cannot evaluate unsupported %s operation: %s" ,
48
+ errors .InternalErrorMessagePrefix ,
48
49
e .kind .Name (),
49
50
e .operation .Symbol (),
50
51
)
@@ -323,7 +324,10 @@ var _ errors.InternalError = InvalidatedResourceError{}
323
324
func (InvalidatedResourceError ) IsInternalError () {}
324
325
325
326
func (e InvalidatedResourceError ) Error () string {
326
- return "internal error: resource is invalidated and cannot be used anymore"
327
+ return fmt .Sprintf (
328
+ "%s resource is invalidated and cannot be used anymore" ,
329
+ errors .InternalErrorMessagePrefix ,
330
+ )
327
331
}
328
332
329
333
// DestroyedResourceError is the error which is reported
@@ -633,7 +637,8 @@ func (MemberAccessTypeError) IsInternalError() {}
633
637
634
638
func (e MemberAccessTypeError ) Error () string {
635
639
return fmt .Sprintf (
636
- "invalid member access: expected `%s`, got `%s`" ,
640
+ "%s invalid member access: expected `%s`, got `%s`" ,
641
+ errors .InternalErrorMessagePrefix ,
637
642
e .ExpectedType .QualifiedString (),
638
643
e .ActualType .QualifiedString (),
639
644
)
@@ -657,7 +662,8 @@ func (e ValueTransferTypeError) Error() string {
657
662
)
658
663
659
664
return fmt .Sprintf (
660
- "invalid transfer of value: expected `%s`, got `%s`" ,
665
+ "%s invalid transfer of value: expected `%s`, got `%s`" ,
666
+ errors .InternalErrorMessagePrefix ,
661
667
expected ,
662
668
actual ,
663
669
)
@@ -675,7 +681,8 @@ func (UnexpectedMappedEntitlementError) IsInternalError() {}
675
681
676
682
func (e UnexpectedMappedEntitlementError ) Error () string {
677
683
return fmt .Sprintf (
678
- "invalid transfer of value: found an unexpected runtime mapped entitlement `%s`" ,
684
+ "%s invalid transfer of value: found an unexpected runtime mapped entitlement `%s`" ,
685
+ errors .InternalErrorMessagePrefix ,
679
686
e .Type .QualifiedString (),
680
687
)
681
688
}
@@ -692,7 +699,8 @@ func (ResourceConstructionError) IsInternalError() {}
692
699
693
700
func (e ResourceConstructionError ) Error () string {
694
701
return fmt .Sprintf (
695
- "cannot create resource `%s`: outside of declaring location %s" ,
702
+ "%s cannot create resource `%s`: outside of declaring location %s" ,
703
+ errors .InternalErrorMessagePrefix ,
696
704
e .CompositeType .QualifiedString (),
697
705
e .CompositeType .Location .String (),
698
706
)
@@ -952,7 +960,8 @@ func (InvalidAttachmentOperationTargetError) IsInternalError() {}
952
960
953
961
func (e InvalidAttachmentOperationTargetError ) Error () string {
954
962
return fmt .Sprintf (
955
- "cannot add or remove attachment with non-owned value (%T)" ,
963
+ "%s cannot add or remove attachment with non-owned value (%T)" ,
964
+ errors .InternalErrorMessagePrefix ,
956
965
e .Value ,
957
966
)
958
967
}
@@ -1092,7 +1101,10 @@ var _ errors.InternalError = ResourceReferenceDereferenceError{}
1092
1101
func (ResourceReferenceDereferenceError ) IsInternalError () {}
1093
1102
1094
1103
func (e ResourceReferenceDereferenceError ) Error () string {
1095
- return "internal error: resource-references cannot be dereferenced"
1104
+ return fmt .Sprintf (
1105
+ "%s resource-references cannot be dereferenced" ,
1106
+ errors .InternalErrorMessagePrefix ,
1107
+ )
1096
1108
}
1097
1109
1098
1110
// ResourceLossError
@@ -1117,7 +1129,10 @@ var _ errors.InternalError = InvalidCapabilityIDError{}
1117
1129
func (InvalidCapabilityIDError ) IsInternalError () {}
1118
1130
1119
1131
func (e InvalidCapabilityIDError ) Error () string {
1120
- return "capability created with invalid ID"
1132
+ return fmt .Sprintf (
1133
+ "%s capability created with invalid ID" ,
1134
+ errors .InternalErrorMessagePrefix ,
1135
+ )
1121
1136
}
1122
1137
1123
1138
// ReferencedValueChangedError
0 commit comments