Add debug logging for Poke webhook auth to diagnose 401s

This commit is contained in:
Kacper Kwapisz
2026-03-23 00:20:23 +01:00
parent 9c84ea1a91
commit 8a2d6ac8ed
+11
View File
@@ -262,6 +262,17 @@ async def forward_to_poke(email_data: dict, webhook_url: str, api_key: str) -> b
headers = {"Content-Type": "application/json"}
if api_key:
headers["Authorization"] = f"Bearer {api_key}"
else:
logger.warning(
"No Poke API key configured — webhook request will be unauthenticated"
)
logger.debug(
"Forwarding to %s (api_key set: %s, key prefix: %s)",
webhook_url,
bool(api_key),
api_key[:8] + "..." if api_key and len(api_key) > 8 else "***",
)
for attempt in range(2):
try: