Details
-
Bug
-
Resolution: Fixed
-
Medium
Description
Looks like you guys are not catching an exception. I tried to add a user to my private repo and resulted in the following error.....
#!json {"error": {"message": "'PaymentRequiredException' object has no attribute 'actor'", "detail": " File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/piston/resource.py\", line 208, in __call__\n result = checked_meth(request, *args, **kwargs)\n File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/piston/resource.py\", line 195, in checked_meth\n return meth(*args, **kwargs)\n File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/newrelic-2.12.0.10/newrelic/hooks/component_piston.py\", line 33, in __call__\n return self._nr_wrapped(*args, **kwargs)\n File \"/opt/python/domains/bitbucket.org/current/bitbucket/../bitbucket/apps/bb/decorators.py\", line 38, in wrap\n return f(request, *a, **kwa)\n File \"/opt/python/domains/bitbucket.org/current/bitbucket/../bitbucket/apps/api/v10/decorators.py\", line 369, in wrapper\n return func(*args, **kwargs)\n File \"/opt/python/domains/bitbucket.org/current/bitbucket/../bitbucket/apps/api/v10/decorators.py\", line 28, in wrapper\n return f(self, request, *args, **kwargs)\n File \"/opt/python/domains/bitbucket.org/current/bitbucket/../bitbucket/apps/api/v10/decorators.py\", line 47, in wrapped_function\n return func(self, request, *args, **kwargs)\n File \"/opt/python/domains/bitbucket.org/current/bitbucket/../bitbucket/apps/api/v10/decorators.py\", line 104, in wrapper\n response = func(*args, **kwargs)\n File \"/opt/python/domains/bitbucket.org/current/bitbucket/../bitbucket/apps/api/v10/decorators.py\", line 440, in _inner\n e.users_required, actor=e.actor)\n File \"/opt/python/domains/bitbucket.org/current/bitbucket/../bitbucket/apps/api/v10/decorators.py\", line 314, in __init__\n can_upgrade = self.actor is not None and is_account_admin(self.user,\n", "id": "a6611e80751d481cbf6cbef4959e90d1"}}