Guidance Metadata
- Type: Bug Fix
- Difficulty: Easy (Good First Issue)
- Category: Error Handling
Description
The deleteMember controller does not verify if the member exists before calling the delete service. If the member is not found, Prisma throws a RecordNotFound error which results in a 500 Internal Server Error response.
Acceptance Criteria
Files to Modify
src/controllers/member.controller.ts
Guidance Metadata
Description
The
deleteMembercontroller does not verify if the member exists before calling the delete service. If the member is not found, Prisma throws aRecordNotFounderror which results in a 500 Internal Server Error response.Acceptance Criteria
deleteMemberinsidesrc/controllers/member.controller.ts.Member not foundif they do not exist.npm test).Files to Modify
src/controllers/member.controller.ts