#17891·saleor

TypeError: 'NoneType' object is not iterable

Author: sentry[bot]Created Jun 30, 2025Updated Aug 4, 2026
Labelsbughelp wanted

There is an issue when the webhook doesn't respond, and the paymentGatewayInitialize mutation receives the following variables in the prepare_response method:

payment_gateways_input = [PaymentGatewayData(app_identifier='saleor.app.payment.stripe', data=None, error=None)]
payment_gateways_response = None

This results in the mutation failing with the following exception:

TypeError: 'NoneType' object is not iterable
(1 additional frame(s) were not displayed)
...
  File "saleor/graphql/core/mutations.py", line 521, in mutate
    response = cls.perform_mutation(root, info, **data)
  File "saleor/graphql/payment/mutations/transaction/payment_gateway_initialize.py", line 149, in perform_mutation
    gateway_configs=cls.prepare_response(payment_gateways_data, response_data),
  File "saleor/graphql/payment/mutations/transaction/payment_gateway_initialize.py", line 81, in prepare_response
    gateway.app_identifier: gateway for gateway in payment_gateways_response

A query failed unexpectedly

First seen in 3.22.0-a.0.

Internal Sentry issue: SALEOR-CORE-6GE