unexpected type
Some checks failed
Build and Publish / BuildAndDeploy (push) Failing after 3m14s
Build and Publish / BuildAndDeployAmd64 (push) Has been cancelled

This commit is contained in:
matst80
2025-04-18 18:38:27 +02:00
parent f8c629e1bc
commit 01a64c1fd1

View File

@@ -3,6 +3,7 @@ package main
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"log"
"slices" "slices"
"sync" "sync"
"time" "time"
@@ -475,6 +476,7 @@ func (c *CartGrain) HandleMessage(message *Message, isReplay bool) (*FrameWithPa
case OrderCompletedType: case OrderCompletedType:
msg, ok := message.Content.(*messages.OrderCreated) msg, ok := message.Content.(*messages.OrderCreated)
if !ok { if !ok {
log.Printf("expected OrderCompleted, got %T", message.Content)
err = fmt.Errorf("expected OrderCompleted") err = fmt.Errorf("expected OrderCompleted")
} else { } else {
c.OrderReference = msg.OrderId c.OrderReference = msg.OrderId