Skip to content

Validation error when the reviewer does not exist in the database. #4

@hashir-ayaz

Description

@hashir-ayaz

Bug Report

Defect ID

TC_CR_006

Summary

Validation failure: Reviewer does not exist in the database.

Steps to Reproduce

  1. Log in as a valid user.
  2. Ensure the reviewer does not exist in the database.
  3. Send a POST request to /createReview with a non-existent reviewerId.

Expected Result

  1. Response status: 404 Not Found.
  2. success=false.
  3. Error message: "Reviewer not found".

Actual Result

  1. Response status: 200 OK.
  2. Response body:
    {
        "message": "Review created successfully.",
        "review": {
            "reviewerId": "67594cc0196d6b3016a9be4f",
            "revieweeId": "67595491a816d851e4bcec51",
            "rating": 4,
            "title": "Great Experience!",
            "reviewText": "Good Work",
            "_id": "67595564196d6b3016a9be7a",
            "__v": 0
        }
    }
    

Severity:
High

Priority:
Medium

Status:
Open

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions