Skip to content

Commit

Permalink
Update: Refactored Source Code (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangsonww committed Jun 13, 2024
1 parent d3c2726 commit 8d2cf6b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ searchInput.addEventListener('input', async (e) => {
throw new Error(`Failed to fetch: ${response.statusText}`);
}
const data = await response.json();

if (data.cod !== "200") {
console.error('Error from API:', data.message);
return;
Expand Down

0 comments on commit 8d2cf6b

Please sign in to comment.