Skip to content

Commit e9711ad

Browse files
committed
fix(backend/redis): diagnostics panic
1 parent d72004e commit e9711ad

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

backend/redis/diagnostics.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,13 @@ func (rb *redisBackend) GetWorkflowInstances(ctx context.Context, afterInstanceI
5959

6060
var instanceRefs []*diag.WorkflowInstanceRef
6161
for _, instance := range instances {
62+
instStr, ok := instance.(string)
63+
if !ok {
64+
continue
65+
}
66+
6267
var state instanceState
63-
if err := json.Unmarshal([]byte(instance.(string)), &state); err != nil {
68+
if err := json.Unmarshal([]byte(instStr), &state); err != nil {
6469
return nil, fmt.Errorf("unmarshaling instance state: %w", err)
6570
}
6671

0 commit comments

Comments
 (0)