Skip to content

Commit

Permalink
update js to display correct msg
Browse files Browse the repository at this point in the history
  • Loading branch information
augustosalazar committed Nov 5, 2024
1 parent 292ab85 commit 8a108df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ document.getElementById('get-users-form').addEventListener('submit', async (even

const users = await response.json();
if (!response.ok) {
throw new Error(users.message || 'Error fetching users');
throw new Error(result.detail || 'Error fetching users');
}

document.getElementById('users-list').innerText = JSON.stringify(users);
Expand Down

0 comments on commit 8a108df

Please sign in to comment.