Org Web Adapter

pages/mmpy_439_error_submitting_acount.org

ID
8e23c39c-0be5-4e61-8762-a001e1cb1083

MMPY-439 Error submitting account

- source :: https://multimediallc.atlassian.net/browse/MMPY-439

- tags :: Falcon Nest Project Story Falcon Nest Project

- epic :: MMPY-274 Payout Method UI for all payout methods

- pull :: https://github.com/multimediallc/mm-pay-internal/pull/440

- sprint :: MM Sprint 25

- status :: Status - Complete

Tasks

DONE Investigate the cause of the missing Payee

bugmultimediallcworkfalconnestmmpy439mmpy274
ID
e654adce-ef6d-9754-5290-8142d9d5fe44

DONE Open a pull request addressing uncaught exception

bugmultimediallcworkfalconnestmmpy439mmpy274
ID
03a037d1-d6ad-d30f-4100-dc15fb24bb46

DONE Fix missing tests for multiple Payee profiles

bugmultimediallcworkfalconnestmmpy439mmpy274tests
ID
c5dc133e-e1a7-0594-ec62-8e9539209586

- Note taken on

Trying to do a better job of talking through what's working or not. In this case, just as I was slipping off to sleep I realized how to fix this.

Now we create mutliple PayeeRecords, and then bulk update all records to have inactive_at to be None, because that's how we choose the PayeeRecord to include with a Payee.

TODO Try to get local API calls working again

bugdevdayslostmultimediallcworkfalconnestmmpy439mmpy274tests
ID
fccf85a3-1b00-2550-9205-ec5414db3b79

TODO Investigate how multiple or missing payeeprofiles state happens

bugmultimediallcworkfalconnestmmpy439mmpy274tests
ID
973b070a-db71-08f3-43f8-e66759917c58

- Note taken on

Well this was frustrating ... Shubham Singh introduced an external API call that requires a signed private key. It was merged a few weeks ago and for whatever reason I hadn't restarted docker since then.

Turns out nothing works now with a NEST_PRIVATE_KEY, but there is no documentation on how to generate one or where to get one. I'm working through it now, but boy is not non-obvious.

TODO

Background

This error was discovered trying to add a stripe account. We will not be

offering Stripe as a payout method in a production situation. However, we should

look into this error to see if we have a bug that is meaningful to fix for other

payout methods.

#+begin_src bash

| 2025-10-09 20:44:59 - django.request - ERROR - Internal Server Error: /api/user/payees/0199589b-0387-7a4c-b5e2-6c23203501c9/accounts/

django-1 | Traceback (most recent call last):

django-1 | File "/usr/local/lib/python3.13/site-packages/django/core/handlers/exception.py", line 55, in inner

django-1 | response = get_response(request)

django-1 | File "/usr/local/lib/python3.13/site-packages/reversion/middleware.py", line 26, in __call__

django-1 | return self.get_response(request)

django-1 | ~~~~~~~~~~~~~~~~~^^^^^^^^^

django-1 | File "/usr/local/lib/python3.13/site-packages/reversion/views.py", line 27, in do_revision_view

django-1 | with create_revision_base(manage_manually=manage_manually, using=using, atomic=atomic):

django-1 | ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

django-1 | File "/usr/local/lib/python3.13/site-packages/reversion/revisions.py", line 328, in __exit__

django-1 | return self._context.__exit__(exc_type, exc_value, traceback)

django-1 | ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

django-1 | File "/usr/local/lib/python3.13/contextlib.py", line 148, in __exit__

django-1 | next(self.gen)

django-1 | ~~~~^^^^^^^^^^

django-1 | File "/usr/local/lib/python3.13/site-packages/reversion/revisions.py", line 285, in _create_revision_context

django-1 | with context:

django-1 | ^^^^^^^

django-1 | File "/usr/local/lib/python3.13/site-packages/django/db/transaction.py", line 307, in __exit__

django-1 | connection.set_autocommit(True)

django-1 | ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^

django-1 | File "/usr/local/lib/python3.13/site-packages/django/db/backends/base/base.py", line 491, in set_autocommit

django-1 | self.run_and_clear_commit_hooks()

django-1 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^

django-1 | File "/usr/local/lib/python3.13/site-packages/django/db/backends/base/base.py", line 769, in run_and_clear_commit_hooks

django-1 | func()

django-1 | ~~~~^^

django-1 | File "/opt/app/nest/payee/models.py", line 566, in <lambda>

django-1 | lambda: utils.send_payout_method_added_emails(self.profile.application_user, str(self.payment_method))

django-1 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

django-1 | File "/opt/app/nest/payee/utils.py", line 161, in send_payout_method_added_emails

django-1 | to_email=profile.payee.email,

django-1 | ^^^^^^^^^^^^^

django-1 | File "/opt/app/nest/payee/models.py", line 291, in payee

django-1 | raise Payee.DoesNotExist

django-1 | nest.payee.models.Payee.DoesNotExist

django-1 | 2025-10-09 20:44:59 - django.server - ERROR - "POST /api/user/payees/0199589b-0387-7a4c-b5e2-6c23203501c9/accounts/ HTTP/1.1" 500 116489

#+end_src