mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: information leaking through print logs
This commit is contained in:
parent
31a2bbc4de
commit
7f67fe12af
@ -112,17 +112,14 @@ class BaseAPIView(TimezoneMixin, APIView, BasePaginator):
|
||||
)
|
||||
|
||||
if isinstance(e, ObjectDoesNotExist):
|
||||
model_name = str(exc).split(" matching query does not exist.")[
|
||||
0
|
||||
]
|
||||
return Response(
|
||||
{"error": f"{model_name} does not exist."},
|
||||
{"error": "The requested resource does not exist."},
|
||||
status=status.HTTP_404_NOT_FOUND,
|
||||
)
|
||||
|
||||
if isinstance(e, KeyError):
|
||||
return Response(
|
||||
{"error": f"key {e} does not exist"},
|
||||
{"error": "The required key does not exist."},
|
||||
status=status.HTTP_400_BAD_REQUEST,
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user