Skip to content

Commit b778c25

Browse files
kwzrdShivansh-007jb3
committed
Branding: log after successful fetch
Co-authored-by: Shivansh-007 <[email protected]> Co-authored-by: Joe Banks <[email protected]>
1 parent 220590c commit b778c25

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: bot/exts/backend/branding/_repository.py

+4
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ async def fetch_directory(self, path: str, types: t.Container[str] = ("file", "d
107107
async with self.bot.http_session.get(full_url, params=PARAMS, headers=HEADERS) as response:
108108
if response.status != 200:
109109
raise RuntimeError(f"Failed to fetch directory due to status: {response.status}")
110+
111+
log.debug("Fetch successful, reading JSON response.")
110112
json_directory = await response.json()
111113

112114
return {file["name"]: RemoteObject(file) for file in json_directory if file["type"] in types}
@@ -122,6 +124,8 @@ async def fetch_file(self, download_url: str) -> bytes:
122124
async with self.bot.http_session.get(download_url, params=PARAMS, headers=HEADERS) as response:
123125
if response.status != 200:
124126
raise RuntimeError(f"Failed to fetch file due to status: {response.status}")
127+
128+
log.debug("Fetch successful, reading payload.")
125129
return await response.read()
126130

127131
def parse_meta_file(self, raw_file: bytes) -> MetaFile:

0 commit comments

Comments
 (0)