VAYUFailure Labs
Colour theme
Investigate a failure

VAYU FAILURE LABS · DISCLOSED SYNTHETIC SCENARIO

Browse all labs

Airflow XCom key mismatch

LAB 01 · AIRFLOW

The upstream task succeeded.
The downstream value is still None.

Synthetic case8–10 minutesMedium difficulty

THE FAILURE

normalize_orders fails with TypeError: 'NoneType' object is not iterable.

THE CONSTRAINT

The upstream extract_orders task is marked successful. No retry, scheduler, or network error appears in the final traceback.

YOUR JOB

Find the first supported explanation before changing retries, dependencies, or Airflow configuration.

DAG EXCERPT

Relevant code only

orders_daily.py
from airflow.decorators import task

@task
def extract_orders():
    response = client.get("/orders")
    response.raise_for_status()
    return response.json()["orders"]

@task
def normalize_orders(**context):
    orders = context["ti"].xcom_pull(
        task_ids="extract_orders", key="orders"
    )
    return [normalize(order) for order in orders]

normalize_orders()

The lab intentionally shows only the context needed to support or rule out a diagnosis.

EVIDENCE TRAIL

Open the signals in order

0 of 3 signals reviewed
01Failed task logWhat did the task actually receive?
[2026-11-28 05:32:14] INFO - Pulling XCom: task_id=extract_orders, key=orders
[2026-11-28 05:32:14] INFO - Pulled value: None
[2026-11-28 05:32:14] ERROR - TypeError: 'NoneType' object is not iterable

The downstream task asked for an XCom named orders. It got None.

02Upstream task logDid the upstream task produce an output?
[2026-11-28 05:32:02] INFO - GET /orders returned 200
[2026-11-28 05:32:03] INFO - Done. Returned value was: [{"id": "ord_481"}, ...]
[2026-11-28 05:32:03] INFO - Marking task as SUCCESS

The upstream task did produce a list. The question is where Airflow stored that returned value.

03Storage conventionWhich key does a TaskFlow return use?

A value returned from an Airflow @task is automatically stored under the XCom key return_value, unless the producer explicitly pushes a different key.

Reference: Apache Airflow XCom documentation.

LIKELY ROOT CAUSEThe producer returned an XCom under return_value; the consumer pulled orders.

The task did not fail to produce data. The consumer requested a key that the producer never wrote. A retry cannot correct a key mismatch.

−task_ids="extract_orders", key="orders"
+task_ids="extract_orders"

REVIEW BEFORE APPLYINGUse the default return key only if the returned list is small enough for XCom. For larger payloads, store the data externally and pass a reference instead.

What this lab teaches: a successful upstream task narrows the search; it does not prove the downstream task read the same value.

WHEN THE FAILURE IS YOURS

Bring the real context.
Keep the review step.

VAYU investigates the code and logs you explicitly submit. It never executes them.

Start a free investigation