Updated the logic to return 404 instead of 200 when wrong taskRequest Id is sent#2296
Updated the logic to return 404 instead of 200 when wrong taskRequest Id is sent#2296iamitprakash merged 20 commits intoRealDevSquad:developfrom
Conversation
|
Can you please check if we have tets written for this, if yes then how are they passing before |
|
Also can we please improve the title and PR description |
+1 |
|
Update the API Contract and link it here for the error codes and other changes. |
|
add tests SS |
|
Add test coverage |
shubhdevelop
left a comment
There was a problem hiding this comment.
catch block error message in the findTaskRequestById is not correct, can you please update it as well
updated the error message |
I have kept test coverage screenshot in the Description |
|
RealDevSquad/website-api-contracts#207 API contract changes |
shubhdevelop
left a comment
There was a problem hiding this comment.
please add unit test coverage for the fetchTaskRequestById()
I have added the unit test screenshot |
Date: 14-12-24
Developer Name: akshat
Issue Ticket Number
Description
When queried with taskRequestId which doesn't exist,
fetchTaskRequestByIdwas returningTasks returned successfullyinstead ofTask request not found, have changed the code to return the proper error message, currently there are no tests for this case, so it didn't get highlighted.Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Current implementation returning 200 OK, even when the id is incorrect
Updated implementation to return `Task request not found` when wrong id is passed
Test Coverage
Screenshot 1
unit test coverage

Additional Notes