From 5ca18795e86fb205305d28394e56df7bf7c3bc8b Mon Sep 17 00:00:00 2001 From: shaochengbao Date: Tue, 22 Aug 2023 10:29:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=EF=BC=9A429=E9=99=90?= =?UTF-8?q?=E5=88=B6=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/u_api_handler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/u_api_handler.py b/utils/u_api_handler.py index 16ec106..6ec1180 100644 --- a/utils/u_api_handler.py +++ b/utils/u_api_handler.py @@ -83,6 +83,9 @@ def get_notion_result(request: NotionRequest) -> (bool, str): if notion_ai.is_un_authorized_error(result): return False, f"【NotionAI的认证失败/认证已过期】{result}" + if notion_ai.is_429_error(result): + return False, f"【429请求频繁限制】{result}" + return True, result