mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2026-10-26 03:17:56 +00:00
Error response
This commit is contained in:
+1
-1
@@ -204,7 +204,7 @@ def custom_error_response(detail, response_status):
|
||||
if not detail:
|
||||
"""when details is empty"""
|
||||
detail = {}
|
||||
return Response({"error": detail, "status": "failed", "code": response_status})
|
||||
return Response({"error": detail, "status": "failed", "code": response_status}, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
|
||||
def get_user_data(attrs):
|
||||
|
||||
Reference in New Issue
Block a user