Skip to content

Commit

Permalink
AbCache: Output response content with bad status codes
Browse files Browse the repository at this point in the history
  • Loading branch information
mos9527 committed Feb 3, 2025
1 parent 622ae03 commit 0e4a745
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sssekai/abcache/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class AbCacheConfig:
app_version: str
app_platform: str
app_hash: str
ab_version: str = None # Override AB version in url for ROW
ab_version: str = None # Override AB version in url for ROW

auth_userID: str = None
auth_credential: str = None # JWT token for JP/EN, Base64 encoded JWT token for ROW
Expand Down Expand Up @@ -445,11 +445,11 @@ def request_packed(self, method: str, url: str, data: dict = None, **kwargs):
data = encrypt(data, SEKAI_APIMANAGER_KEYSETS[self.config.app_region])
resp = self.request(method=method, url=url, data=data, **kwargs)
if 400 <= resp.status_code < 600:
try: # log the error message provided by the API.
try: # log the error message provided by the API.
self.response_to_dict(resp)
logger.warn("%s" % resp)
logger.error("HTTP %3d, response=%s" % (resp.status_code, resp.content))
except:
logger.warn("%s" % resp)
logger.error("HTTP %3d, response=%s" % (resp.status_code, resp.content))
resp.raise_for_status()
return resp

Expand Down

0 comments on commit 0e4a745

Please sign in to comment.