Skip to content

Commit

Permalink
minor: 平息了 API 使用情况获取失败的提示
Browse files Browse the repository at this point in the history
  • Loading branch information
GaiZhenbiao committed Jul 26, 2023
1 parent dd740ac commit 51f18f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def billing_info(self):
try:
usage_data = self._get_billing_data(usage_url)
except Exception as e:
logging.error(f"获取API使用情况失败: " + str(e))
# logging.error(f"获取API使用情况失败: " + str(e))
if "Invalid authorization header" in str(e):
return i18n("**获取API使用情况失败**,需在填写`config.json`中正确填写sensitive_id")
elif "Incorrect API key provided: sess" in str(e):
Expand Down Expand Up @@ -182,7 +182,7 @@ def _refresh_header(self):
"Content-Type": "application/json",
"Authorization": f"Bearer {sensitive_id}",
}


def _get_billing_data(self, billing_url):
with retrieve_proxy():
Expand Down

0 comments on commit 51f18f8

Please sign in to comment.