feat(patreon): surface source URL + vanity in campaign-id resolution errors
Naming/lookup failures now report the source_url, the extracted vanity, and the exact campaigns-API lookup URL attempted, so a "could not resolve campaign id" error is diagnosable (wrong vanity? cookie/auth? creator renamed?) instead of opaque. Applied to all three resolution surfaces: the native download event, the dry-run preview, and the credential-verify probe. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -45,7 +45,7 @@ from .patreon_client import (
|
||||
PatreonDriftError,
|
||||
)
|
||||
from .patreon_downloader import PatreonDownloader
|
||||
from .patreon_resolver import resolve_campaign_id_for_source
|
||||
from .patreon_resolver import extract_vanity, resolve_campaign_id_for_source
|
||||
|
||||
__all__ = [
|
||||
"DEAD_LETTER_THRESHOLD",
|
||||
@@ -186,9 +186,11 @@ async def verify_patreon_credential(
|
||||
"""
|
||||
campaign_id, _ = await resolve_campaign_id_for_source(url, cookies_path, overrides)
|
||||
if not campaign_id:
|
||||
vanity = extract_vanity(url)
|
||||
return None, (
|
||||
"Couldn't resolve the Patreon campaign id from the source URL — "
|
||||
"can't verify (cookies expired, or the creator moved/renamed?)."
|
||||
f"Couldn't resolve the Patreon campaign id — can't verify. "
|
||||
f"source_url={url!r}; vanity={vanity!r} "
|
||||
"(cookies expired, or the creator moved/renamed?)."
|
||||
)
|
||||
client = PatreonClient(cookies_path)
|
||||
loop = asyncio.get_running_loop()
|
||||
|
||||
Reference in New Issue
Block a user