From bda2b7b59aff613a7259e95785d1dbaecae95887 Mon Sep 17 00:00:00 2001 From: Untone Date: Mon, 11 Mar 2024 12:41:00 +0300 Subject: [PATCH] unfollow-debug --- resolvers/follower.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/resolvers/follower.py b/resolvers/follower.py index 7a883ae6..beadcbe3 100644 --- a/resolvers/follower.py +++ b/resolvers/follower.py @@ -73,6 +73,7 @@ async def follow(_, info, what, slug): @login_required async def unfollow(_, info, what, slug): follows = None + error = '' try: user_id = info.context.get('user_id') if not user_id: @@ -105,9 +106,11 @@ async def unfollow(_, info, what, slug): elif what == 'REACTIONS': reactions_unfollow(follower.id, slug) except Exception as e: - return {'error': str(e)} - - return {f'{what.lower()}s': follows} + error = e + import traceback + traceback.print_exc() + finally: + return {'error': str(error), f'{what.lower()}s': follows} async def get_follows_by_user_id(user_id: str):