Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e158eeee authored by Noémi Ványi's avatar Noémi Ványi
Browse files

Propagate error messages from YouTube API

parent 835d16cb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -47,6 +47,9 @@ def response(resp):

    search_results = loads(resp.text)

    if 'error' in search_results and 'message' in search_results['error']:
        raise Exception(search_results['error']['message'])

    # return empty array if there are no results
    if 'items' not in search_results:
        return []