This seems simple enough (maybe I'm missing something obvious), I'm sending an enum and an int (returned from function call). Is there something wrong with this? It always returns a result of "InvalidData"

skillCorrect is an enum value (checked logs and looks valid), GetDifficultly returns an int, again logs returned a valid value.

CustomEvent("skill-correct", new Dictionary<string, object>{{"skill-type", skillCorrect}, {"difficulty", GetDifficulty(skillCorrect)}})

We have other projects that pass enums, I thought it converted the parameter to a string by default. I'll try converting it to a string.

EDIT: That seems to be working. From now on we'll convert enums ToString().

Thanks for proactively solving your own issue! :)

Our system only supports strings, bools and numbers. We're contemplating a couple API changes, and one of the ones I'll push for is an implicit conversion of Enums.

[quote=“marc_tanenbaum”, post:3, topic: 602627]
Thanks for proactively solving your own issue! :slight_smile:
Haha, for sure!

Yeah I must have been mistaken that it worked in the past. We have a facade for analytics so we are now converting any missed Enums before we send events out.

1 Like

That's a good idea (I'm a huge fan of building facades/interfaces that insulate me from the downstream effects of other teams/companies).

I've asked our scheduling guy to allow us a bit of time for this fix, since it's super easy and very sensible.

1 Like