Skip to content

Commit 67f4760

Browse files
Potential fix for code scanning alert no. 1: Information exposure through an exception
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 78e3533 commit 67f4760

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

management/core/api/viewset.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ def post(self, request, format=None):
114114
status=status.HTTP_205_RESET_CONTENT,
115115
)
116116
except Exception as exc:
117+
logger.error("Error during logout: %s", exc, exc_info=True)
117118
return Response(
118-
{"detail": str(exc)},
119+
{"detail": "An error occurred during logout. Please try again later."},
119120
status=status.HTTP_400_BAD_REQUEST,
120121
)
121122

0 commit comments

Comments
 (0)