Problem
Local docker compose harness keeps dropping the CXone Data Action events when the schema drifts. We’ve got the Go consumer subscribed to the Kafka mirror topic, but the JSONata rules just choke on missing fields. It’s supposed to fall back to the default mapping template before pushing to AWS SNS.
Code
if err := jsonata.Transform(raw, rules); err != nil {
normalized, _ := jsonata.Transform(raw, fallbackTemplate)
sns.Publish(normalized)
}
Error
panic: runtime error: invalid memory address or nil pointer dereference
Question
Trying to wrap the fallback logic in a defer block to keep the SNS delivery confirmation intact. Pointer keeps blowing up during the transform switch.