question

Jeff Orkin avatar image
Jeff Orkin asked

RegisterPlayFabUser's error callback has null data

I am using the Unity C# SDK. When registration fails, I expect the error to contain some data indicating how the registration failed. Instead the results from the callback are null.

I'm not sure if this is a Bug or working as designed.

10 |1200

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

brendan avatar image
brendan answered

In the Unity SDK, the error details are returned in the PlayFabError returned (https://github.com/PlayFab/UnitySDK/blob/master/PlayFabClientSample/Assets/PlayFabSDK/Public/PlayFabErrors.cs). If you're not seeing this, can you let us know what version of the SDK you're using?

The ErrorDetails returned is a string, but it's not really our recommendation that you use that to inform the user of the issue - that text is written to provide info to the developer on what the issue was.

10 |1200

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

Jeff Orkin avatar image
Jeff Orkin answered

Additional thoughts -- what I am hoping for is an error response from PlayFab that has an error message that I can display to the user, that says something like "Passwords must be more than 4 characters" or "Username already taken" or whatever.

10 |1200

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

Jeff Orkin avatar image
Jeff Orkin answered

Ah ok, I see that now. I am getting the string. I was confused by the way Visual Studio was presenting the error result as null in the debugger, despite being able to access error.ErrorMessage. Thanks!

10 |1200

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

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.