Skip to content
Snippets Groups Projects
Commit 7f965f09 authored by Cody Dumortier's avatar Cody Dumortier
Browse files

alerte probleme

parent 1d5e5a94
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,7 @@ export default class AddPizzaPage extends Page {
body: JSON.stringify(pizza),
}).then(response => {
if (!response.ok) {
alert('La pizza existe déja !');
throw new Error(`Erreur : ${response.statusText}`);
} else {
alert(`La pizza ${name} a été ajoutée !`);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment