frankie567/httpx-oauth

Handle KeyError when accessing id and email in get_id_email method of clients

BolotZhusupekov07 opened this issue · 1 comments

There is a case if user has not specified an email in their account (Facebook in my case). In response it returns only id. Maybe use dict.get(key) instead of dict['key']

Thank you for the report @BolotZhusupekov07!

I've fixed it like you suggested. In the next version, the email will be Optional in the return type of get_id_email, which will help to support cases like this.