Is there a way to handle the DataStore corruption error?

I saw this:

on the DataStore limits page, and I was like… wait? There’s an error for that?

And I was confused. I’m not sure if this is a typo, but it says as if I had retrieved the data in a way but it could be corrupted.

I have never gotten these datastore errors at all, so I’m confused. Is there a way to get the ‘malformed’ data, how do I detect this, etc… I’m still really confused here, I think the phrasing here might be wrong.

1 Like

A way would be having 2 databases one that would serve like a backup and if the database fails it can just turn to that one or wait for the new api i remember announcing a way to revert a key to an older model and they would automatically delete after 30 days.
But i believe the chances this to happen are so small it wouldn’t be even worth it to make a complex system and probably it could also be just the users fault and not an actual corruption on their end.

1 Like

I’m in the beta, so no worries. I don’t actually completely care about data corruption. I never had it happen to me and haven’t seen it happen to others either.

What I wanted to know was if I get the data with this warning, or if it just errors.

Not really, you can’t control external HTTP requests to the datastores. The best you can do is either using Datastore2 or wrapping requests in pcalls() to avoid script crashes and game malfunctioning.

Datastore2 is kind of ew nowadays not gonna lie.
I wouldn’t recommend it for future use. It’s a good API but it’s main power is gonna be everywhere soonTM.

Also you don’t need to wrap Datastore2 in pcalls. It handles that for you completely.

If you need anything for future work consider ProfileService instead.

Yeah just a typo, you don’t need to wrap them in a pcall.

1 Like