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

alerte probleme

parent 1d5e5a94
Branches master
No related tags found
No related merge requests found
...@@ -73,6 +73,7 @@ export default class AddPizzaPage extends Page { ...@@ -73,6 +73,7 @@ export default class AddPizzaPage extends Page {
body: JSON.stringify(pizza), body: JSON.stringify(pizza),
}).then(response => { }).then(response => {
if (!response.ok) { if (!response.ok) {
alert('La pizza existe déja !');
throw new Error(`Erreur : ${response.statusText}`); throw new Error(`Erreur : ${response.statusText}`);
} else { } else {
alert(`La pizza ${name} a été ajoutée !`); 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