Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
Signed-off-by: SkandaBT <9980056379Skanda@gmail.com>
  • Loading branch information
skanda890 authored Nov 23, 2024
1 parent 2240c86 commit aa21b5a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dictionary-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ app.post('/define', async (req, res) => {
const response = await axios.get(`${API_URL}${word}`);
res.json(response.data);
} catch (error) {
console.error('Error fetching definition:', error.message);
res.status(500).json({ error: 'Error fetching definition' });
}
});
Expand Down

0 comments on commit aa21b5a

Please sign in to comment.