With JavaScript, it was `err.code`, but with C# .. there is only `err.httpcode` which is completely different (no details).
With JavaScript, it was `err.code`, but with C# .. there is only `err.httpcode` which is completely different (no details).
In our Unity SDK, when we call your error callback, we pass a PlayFabError which contains all the information on the error that occurred.
Yes, but the PlayFabErr contains a COMBINATION of 3 different err descriptions, while JS and other libraries offer the ability to break it up. C# can do HTTP code, description (pretty for clients to see), but no code # and no keyword.
So I have to do PlayFabErr.ToString().StartsWith("AccountNotFound") which is really long and awkward instead of just doing PlayFabErr.Code
Error = "(InvalidFacebookToken, Invalid Facebook Token, 400 BadRequest)"
ErrorDetails = "" (blank - odd)
ErrorMessage = "Invalid Facebook Token"
HttpCode = 400
HttpStatus = "BadRequest"
That said, where is the breakdown for InvalidFacebookToken and 1000-something (the playfab internal code)?
In Unity, PlayFabErrorCode is an enum listing all the possible error codes, and it is the Error element in PlayFabError. So for a callback function that uses "e" as the parameter name, it would be:
e.Error
Are you not seeing the error code there?
Error always shows, but that's just for logs since it's not broken down -- but individually like Err.Message? ErrorMessage does not seem to be set for all errors and I believe this to be a bug.
For example: https://community.playfab.com/questions/5633/bug-playfaberror-emailaddressnotavailable-does-not.html
2 People are following this question.