Skip to content

Commit 0de162c

Browse files
committed
fix(slack): log state-backend failures during unfurl enrichment
Address gemini-code-assist review on PR #89 (line 1844). The previous ``except Exception: return links`` swallowed state-backend errors silently, making it hard to debug why link enrichment isn't firing. Log a warning with the exception and message_ts before returning the fallback. Behavior unchanged otherwise — bare URLs still surface to handlers when state reads fail. https://claude.ai/code/session_01FyMxQn2BEAzmwKS1GZczKj
1 parent 3bd5149 commit 0de162c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/chat_sdk/adapters/slack/adapter.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1840,7 +1840,11 @@ async def _enrich_links(self, links: list[LinkPreview], message_ts: str | None)
18401840
while True:
18411841
try:
18421842
stored = await state.get(f"slack:unfurls:{message_ts}")
1843-
except Exception:
1843+
except Exception as exc:
1844+
self._logger.warn(
1845+
"Failed to read unfurl data from state",
1846+
{"error": str(exc), "message_ts": message_ts},
1847+
)
18441848
return links
18451849
if stored or time.monotonic() >= deadline:
18461850
break

0 commit comments

Comments
 (0)