-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
doneissue fixedissue fixed
Description
Lines 79 to 85 in 7a5fea2
| if (!searchedInput) { | |
| console.log("Search call with empty or missing query"); | |
| res.writeHead(400, { "Content-Type": "application/json" }); | |
| res.end(JSON.stringify({ | |
| error: "Search call with empty or missing query" | |
| })); | |
| return; |
I can see you're handling an empty input in the backend in handler.js - good job - could I suggest also handling it in the front-end too (perhaps on the front-end, if the user has tried to press enter or click on the submit button when the input is empty, it would display something and not send the request to the backend in the first place.
Very minor issue though!
Metadata
Metadata
Assignees
Labels
doneissue fixedissue fixed