From d2bfb949eeb2d72ef35ca167961f161b986dcd9a Mon Sep 17 00:00:00 2001 From: disqualifier Date: Sun, 9 Aug 2026 02:12:08 -0400 Subject: [PATCH] fix: drop log-and-raise in create/delete emoji error paths both HTTPException handlers logged at ERROR then re-raised - raise XOR log. the exception propagates unwrapped to the caller (the documented fail-loud contract), so it already carries the failure; the error log double-reported it. drop the log, keep the raise. the module logger stays defined (emit-only) for future use. Signed-off-by: disqualifier --- src/dpy_appemojis/dpy_appemojis.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dpy_appemojis/dpy_appemojis.py b/src/dpy_appemojis/dpy_appemojis.py index b59d394..11e4fe8 100644 --- a/src/dpy_appemojis/dpy_appemojis.py +++ b/src/dpy_appemojis/dpy_appemojis.py @@ -175,7 +175,8 @@ class DPYAppEmojis: try: emoji = await self._client.create_application_emoji(name=name, image=image) except discord.HTTPException: - log.error("dpy_appemojis: creating application emoji '%s' failed", name) + # raise XOR log: this re-raises, so the exception carries the failure to the + # caller (who decides fatal-vs-routine) - no error log here would double-report. raise current[name] = emoji result.created.append(name) @@ -185,7 +186,7 @@ class DPYAppEmojis: try: await emoji.delete() except discord.HTTPException: - log.error("dpy_appemojis: deleting application emoji '%s' failed", name) + # raise XOR log: re-raises, so the exception is the signal - no log here. raise current.pop(name, None) result.deleted.append(name)