Commits
Yue-Wang-Google authored and Paul Beusterien committed 45d2fb2316e
extract errorMessage directly from response when server returns 200 (#2542)
* extract errorMessage directly from response in case of returnIDPCredential=YES
Fix #2522.
In this case, the server returns an 200 without an error like the following:
```
[response data:] {
"error": {
"code": 400,
"message": "FEDERATED_USER_ID_ALREADY_LINKED",
"errors": [
{
"message": "FEDERATED_USER_ID_ALREADY_LINKED",
"domain": "global",
"reason": "invalid"
}
]
}
}
```
Rather, it is directly enclosed in the response with an errorMessage without a structure:
```
[response data:] {
key: value
...
"errorMessage": "FEDERATED_USER_ID_ALREADY_LINKED",
"kind": "identitytoolkit#VerifyAssertionResponse"
}
```
* Update Changelog