diff --git a/plugin/grpc_error.go b/plugin/grpc_error.go index 4875b576c..99ce8c8b8 100644 --- a/plugin/grpc_error.go +++ b/plugin/grpc_error.go @@ -45,26 +45,26 @@ func grpcErr(err error) (diags tfdiags.Diagnostics) { case codes.Unavailable: // This case is when the plugin has stopped running for some reason, // and is usually the result of a crash. - diags = diags.Append(tfdiags.Sourceless( + diags = diags.Append(tfdiags.WholeContainingBody( tfdiags.Error, "Plugin did not respond", fmt.Sprintf("The plugin encountered an error, and failed to respond to the %s call. "+ "The plugin logs may contain more details.", requestName), )) case codes.Canceled: - diags = diags.Append(tfdiags.Sourceless( + diags = diags.Append(tfdiags.WholeContainingBody( tfdiags.Error, "Request cancelled", fmt.Sprintf("The %s request was cancelled.", requestName), )) case codes.Unimplemented: - diags = diags.Append(tfdiags.Sourceless( + diags = diags.Append(tfdiags.WholeContainingBody( tfdiags.Error, "Unsupported plugin method", fmt.Sprintf("The %s method is not supported by this plugin.", requestName), )) default: - diags = diags.Append(tfdiags.Sourceless( + diags = diags.Append(tfdiags.WholeContainingBody( tfdiags.Error, "Plugin error", fmt.Sprintf("The plugin returned an unexpected error from %s: %v", requestName, err),