refactor: drop the pass-through try/except around channel.send

T3-21: except discord.HTTPException: raise did nothing; the exception already
propagates unwrapped.

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
dsql committed 2026-10-16 04:20:22 -04:00
1 parent caf0c3ee5c
commit 675eac310e
1 file changed
+1 -6
+1 -6
View File
@@ -140,12 +140,7 @@ class DPYCache:
for start in range(0, len(items), MAX_ATTACHMENTS_PER_MESSAGE):
group = items[start:start + MAX_ATTACHMENTS_PER_MESSAGE]
discord_files = [self._to_file(name, source) for name, source in group]
try:
message = await self._channel.send(content=content, files=discord_files)
except discord.HTTPException:
# raise XOR log: HTTPException propagates unwrapped (the documented contract),
# so the exception carries the failure to the caller - no error log here.
raise
message = await self._channel.send(content=content, files=discord_files)
attachments = list(message.attachments)
if len(attachments) != len(group):