Skip to content

fix: don't submit success=True when YouTube channel data is None#154

Merged
mizu-tx merged 1 commit into
mainfrom
fix/yt-empty-details-guard
Jun 23, 2026
Merged

fix: don't submit success=True when YouTube channel data is None#154
mizu-tx merged 1 commit into
mainfrom
fix/yt-empty-details-guard

Conversation

@elliot-bitcast

Copy link
Copy Markdown
Contributor

Problem

Sentry issue DB_INGESTION-1 — 216 errors since May 26, still ongoing.
https://bitcast.sentry.io/issues/DB_INGESTION-1

When eval_youtube() fails to retrieve channel data (API error, token expired, channel suspended), it returns early with yt_account.details = None. Previously, _process_youtube_account() wrapped this in an AccountResult with success=True, causing db_ingestion's mapper to crash on the None value.

All 216 events are from a single validator hotkey (5DAoDtMxVqtMu2Nd5E7QhPEGXDMgrySvE1b3rRT5ARDhfNNK) that consistently submits empty account data with success: True.

Fix

In youtube_evaluator.py:_process_youtube_account(), detect the None details case and return an AccountResult.create_error_result() with success=False and a descriptive error message. This way db_ingestion can skip the payload cleanly instead of crashing.

Companion PR

bitcast-network/db_ingestion — defensive guard in the mapper (defense-in-depth)

Fixes DB_INGESTION-1

When eval_youtube() fails to retrieve channel data (API error, token
expired, channel suspended), it returns early with yt_account.details
= None. Previously, _process_youtube_account() wrapped this in an
AccountResult with success=True, causing db_ingestion's mapper to
crash on the None value (DB_INGESTION-1, 216 events since May 26).

Now detects the None details case and returns an error result with
success=False and a descriptive message, so db_ingestion can skip it
cleanly instead of crashing.
@mizu-tx mizu-tx merged commit 45c4314 into main Jun 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants