The keys in question are Base64 encoded, with = being used for padding.
Escaping/encoding the = with %3D does not remedy this issue. \= also does not work. This seems to be an internal exception from gRPC that has to do with the URI component being decoded before it is parsed as a key. I believe this is something that can be adjusted in the gRPC config for the endpoint.
I haven’t been able to find a way to otherwise escape this character, and the DataStore has already been using these keys without issue for years, so changing the key format on our end to something more URI-friendly isn’t ideal.
Expected behavior
Keys should either be escapable or have no limitations on the characters used.
I noticed this issue when migrating from the V1 DataStore endpoints. It’s a regression from the V1 endpoints because those specify the entry key as a query parameter which has no problems with these characters.
You’re able to use the V1 DataStore endpoint for now, but there’s currently no way to access MemoryStores if your keys are stored with these characters.
Thanks for the feedback, we’re aware of it but not something we can fix on a short time frame due to some underlying technical constraints in how these requests are resolved for the Open Cloud v2 stack.
We’re considering this and some other corner cases in future Open Cloud roadmap development. In the mean-time it seems like the above will unblock you if it’s just related to data stores.
Thankfully I added a v1 fallback to my requests so it was a simple fix. Glad it’s something being considered, I really love the interface v2 provides so I was a little sad when this edgecase popped up and prevented me from fully converting my webserver to it.
I wonder if it could be related to how Infinity/NaN values are parsed. The V1 endpoint would output JSON like {"key":inf,"key2":nan} which would break most JSON parsers I used, so I had to manually account for those cases before I could parse it.
The V2 endpoints seem to parse the value for you instead of handing off JSON.
Edit: I’ve confirmed this (but may be unrelated to the above issue). Roblox accepts Infinity and NaN inside DataStores but they can’t be serialized by JSON. I got {"code":2,"message":"Exception was thrown by handler."} when attempting to get the value of this:
Discussed with the OP offline, it was an issue with one of the keys name being empty. Removing it fixed the issue. I will work on a fix to display a better error message for both invalid JSON and invalid structs. Thanks everyone!