unity-web3-game-kit icon indicating copy to clipboard operation
unity-web3-game-kit copied to clipboard

No Information on Why UserObj.SaveAsync() Fails

Open vrxgaminginc opened this issue 2 years ago • 2 comments

Get a MoralisUser in C#

user.username = "existing username" user.email = "existing email" bool result = await user.SaveAsync()

result will be false. but you do not know if the failure is due to username or email or both. in the JS SDK, an error is thrown, the error is not propogated to the C# API where it can be caught.

vrxgaminginc avatar May 26 '22 18:05 vrxgaminginc

Do you see anything in your console log?

Did you create the user with:

MoralisUser user = Moralis.Create<MoralisUser>();

If not the user was not initialized to Moralis as it was created outside of Moralis. Please note that there are a set of changes that include an update to this process so that MoralisUser default constructor will initialize the user to Morlais.

That being said, a more descriptive error response would be better than returning 'false'

xactant avatar May 31 '22 10:05 xactant

Updated code to include save and a signIn exceptions that are thrown when the server reports a condition other than success.

xactant avatar Jun 17 '22 10:06 xactant

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 16 '22 11:08 stale[bot]