This PR ensures that empty responses are handled on the backend and do not throw null pointer exceptions. The servlet now returns a 204 No Content in the response if there are no books found given a search query.
I have updated all relevant fetches to the /api/search?searchTerm to ensure no exceptions get thrown due to the response and instead set the array of books to be empty, which is handled specially by each implementation.
In addition, I updated the criteria for componentDidUpdate in the ClubSearchList, which was causing the club page to rerender based on the books searched in the previous search query.
Description
This PR ensures that empty responses are handled on the backend and do not throw null pointer exceptions. The servlet now returns a 204 No Content in the response if there are no books found given a search query.
I have updated all relevant fetches to the /api/search?searchTerm to ensure no exceptions get thrown due to the response and instead set the array of books to be empty, which is handled specially by each implementation.
In addition, I updated the criteria for componentDidUpdate in the ClubSearchList, which was causing the club page to rerender based on the books searched in the previous search query.
Screenshot of Feature
Linked Issue
78