This pull request introduces a new unit test within the test/bookCategory.test.js file to handle cases where an invalid category name is provided to the /books/category/:categoryName endpoint. The goal is to ensure that the system gracefully handles invalid inputs by returning a 400 status code along with an appropriate error message.
Summary
Added a new test case under the GET /books/category/:categoryName describe block to check the response for invalid category names.
The test sends a request with an invalid category name (!nvalidC@tegoryName) and checks if the response status is 400 and the error message is "Invalid category name.".
This enhancement improves the robustness of the API by ensuring that meaningful feedback is provided for incorrect inputs.
Fixes #85.
š Latest improvements to Sweep:
New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
PR Feedback (click)
Description
This pull request introduces a new unit test within the
test/bookCategory.test.js
file to handle cases where an invalid category name is provided to the/books/category/:categoryName
endpoint. The goal is to ensure that the system gracefully handles invalid inputs by returning a 400 status code along with an appropriate error message.Summary
GET /books/category/:categoryName
describe block to check the response for invalid category names.!nvalidC@tegoryName
) and checks if the response status is400
and the error message is"Invalid category name."
.Fixes #85.
š Latest improvements to Sweep:
š” To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.