dev: update the response for conflicting errors (#3568)

This commit is contained in:
Nikhil 2024-02-06 17:00:42 +05:30 committed by GitHub
parent ac22769220
commit 751b15a7a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 62 additions and 11 deletions

View file

@ -262,7 +262,7 @@ class CycleAPIEndpoint(WebhookMixin, BaseAPIView):
return Response(
{
"error": "Cycle with the same external id and external source already exists",
"cycle": str(cycle.id),
"id": str(cycle.id),
},
status=status.HTTP_409_CONFLICT,
)
@ -325,7 +325,7 @@ class CycleAPIEndpoint(WebhookMixin, BaseAPIView):
return Response(
{
"error": "Cycle with the same external id and external source already exists",
"cycle_id": str(cycle.id),
"id": str(cycle.id),
},
status=status.HTTP_409_CONFLICT,
)