ghamry03 / ft_transcendence

0 stars 0 forks source link

Sending a friend request to someone who's already your friend causes an error #82

Closed MehrinFirdousi closed 6 months ago

MehrinFirdousi commented 6 months ago

Steps to reproduce

Friends app logs

Starting new HTTP connection (1): userapp:8001
http://userapp:8001 "GET /api/user/154165/ HTTP/1.1" 200 228
Serializer validation failed: {'non_field_errors': [ErrorDetail(string='the two users are already Friends', code='duplicate')]}
Bad Request: /api/friends/

Main app logs

Starting new HTTP connection (1): friendsapp:8002
http://friendsapp:8002 "POST /api/friends/ HTTP/1.1" 400 58
Internal Server Error: /add/154165/

Minor but a related issue