anitab-org / anitab-org/mentorship-backend

endpoint /mentorship_relation/send_request does not validate users id

Đang mở
#437 5 bình luận 0 reaction 0 người được giao Xem trên GitHub
Category: Coding Type: Bug
Ngôn ngữ chính
Python
Star
200
Fork
449
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**Describe the bug**
When mentor_id to mentee_id is invalid Internal server error occurs (500)

**To Reproduce**
Steps to reproduce the behaviour:
1. Go to localhost try out'/mentorship_relation/send_request.'
2. Send mentorship relation request with non existing ` "mentor_id": 0`, or `"mentee_id": 0`.
3. See internal server error

**Expected behavior**
Backend should return bad request with information that user with specific id does not exists

**Additional context**
`AttributeError: 'tuple' object has no attribute 'name'`

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.