From 9c7f12e001ebeffc050a2d3ef1393d9698f56762 Mon Sep 17 00:00:00 2001 From: HemanthDogiparthi12 Date: Wed, 31 Jul 2024 17:19:28 +0100 Subject: [PATCH] Fix Nil Pointer --- .../resource_genesyscloud_routing_email_route.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route.go b/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route.go index d2910fa3e..94eb565b6 100644 --- a/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route.go +++ b/genesyscloud/routing_email_route/resource_genesyscloud_routing_email_route.go @@ -70,7 +70,7 @@ func createRoutingEmailRoute(ctx context.Context, d *schema.ResourceData, meta i log.Printf("Creating routing email route %s", d.Id()) inboundRoute, resp, err := proxy.createRoutingEmailRoute(ctx, domainId, &routingEmailRoute) if err != nil { - return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to create routing email route %s error: %s", *routingEmailRoute.Name, err), resp) + return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to create routing email route %s error: %s", *routingEmailRoute.FromName, err), resp) } d.SetId(*inboundRoute.Id) @@ -189,7 +189,7 @@ func updateRoutingEmailRoute(ctx context.Context, d *schema.ResourceData, meta i log.Printf("Updating routing email route %s", d.Id()) inboundRoute, resp, err := proxy.updateRoutingEmailRoute(ctx, d.Id(), domainId, &routingEmailRoute) if err != nil { - return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to update routing email route %s error: %s", *routingEmailRoute.Name, err), resp) + return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("Failed to update routing email route %s error: %s", *routingEmailRoute.FromName, err), resp) } log.Printf("Updated routing email route %s", *inboundRoute.Id)