Skip to content

Commit

Permalink
Fix Nil Pointer (MyPureCloud#1189)
Browse files Browse the repository at this point in the history
  • Loading branch information
HemanthDogiparthi12 authored Jul 31, 2024
1 parent f47ade7 commit 0895bdc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0895bdc

Please sign in to comment.