question

rasto61 avatar image
rasto61 asked

Silent Error on Statistic greater than 2,147,483,647

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

rasto61 avatar image rasto61 commented ·

When I post a statistic greater than 2,147,483,647 the statistic is not updated. (This is logical as its greater than int32.max) However after this happens when the same client posts another statistic that is smaller, it still does not get updated. The client has to restart. Is this the desired behavior or a bug?

0 Likes 0 ·
rasto61 avatar image rasto61 rasto61 commented ·

And no errors are shown on the client whatsoever with loglevel.all

0 Likes 0 ·

1 Answer

·
Andy avatar image
Andy answered

I did some testing of this in my own title. First of all, when attempting to update a statistic with a value that exceeds int32.max I get back a 400 http response with an InvalidParams error. That's about what I would expect. If I then use a smaller value, I get back the expected 200 response.

When you say it fails silently, where are you looking? You mention loglevel.all. Is that something specific to your game engine? When you're unable to make subsequent updates after the first failure. Is it possible you're doing some sort of client side caching and retying failed requests?

Overall, the service appears to be workgin as expected, so I'm trying to understand what is unique about your scenario.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

rasto61 avatar image rasto61 commented ·

Hi, thanks for a quick turnaround.

I meant the PlayfabSettings.LogLevel in the Unity SDK

Did I misunderstood what this does?

Sending such a large number was a problem on my part, and after correcting that all is good.

The weird behavior was that subsequent requests did not update the statistic. I am not caching requests myself. I am using the Unity SDK, does this do so?

0 Likes 0 ·
Andy avatar image Andy ♦♦ rasto61 commented ·

It looks like you've stumbled upon a piece of the Unity SDK that's a bit out of date. PlayFabSettings.LogLevel isn't used anymore. Setting it doesn't change any behavior. If you want to understand the errors your PlayFab API calls are encountering, you have to include an errorCallback Action in the method call.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.