polarsource / polar

Polar is the best funding & monetization platform for developers. From first donation to IPO.
https://polar.sh
Apache License 2.0
1.57k stars 53 forks source link

OpenCollective creation fails if `host` is `None` #3652

Closed sentry-io[bot] closed 1 month ago

sentry-io[bot] commented 1 month ago

Sentry Issue: SERVER-1KS

TypeError: 'NoneType' object is not subscriptable
(26 additional frame(s) were not displayed)
...
  File "polar/kit/routing.py", line 33, in wrapped_endpoint
    response = await endpoint(*args, **kwargs)
  File "polar/account/endpoints.py", line 110, in create
    created = await account_service.create_account(
  File "polar/account/service.py", line 112, in create_account
    account = await self._create_open_collective_account(
  File "polar/account/service.py", line 216, in _create_open_collective_account
    collective = await open_collective.get_collective(
  File "polar/integrations/open_collective/service.py", line 89, in get_collective
    return OpenCollectiveCollective(**collective, host_slug=host["slug"])
frankie567 commented 1 month ago

Happens for collective that are not yet approved