platform.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:bernard 作者: BernardFW 项目源码 文件源码
def _handle_fb_response(self, response: aiohttp.ClientResponse):
        """
        Check that Facebook was OK with the API call we just made and raise
        an exception if it failed.
        """

        ok = response.status == 200

        if not ok:
            # noinspection PyBroadException
            try:
                error = (await response.json())['error']['message']
            except Exception:
                error = '(nothing)'

            raise PlatformOperationError('Facebook says: "{}"'
                                         .format(error))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号