From 0f848ba790e45a6cf7fad28b2520ca297fba3ff5 Mon Sep 17 00:00:00 2001 From: n07070 Date: Wed, 20 May 2026 16:34:45 +0200 Subject: [PATCH] Add an alert if the webcam print fails --- src/static/js/webcam.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/static/js/webcam.js b/src/static/js/webcam.js index 6464273..db9e8ce 100644 --- a/src/static/js/webcam.js +++ b/src/static/js/webcam.js @@ -255,7 +255,12 @@ function print_picture(data){ // headers:{ // 'Content-Type': 'multipart/form-data' // } - }).then(function(response) { console.log('Success:', response); } , true) + }).then(function(response) { + console.log('Reponse:', response); + if(response.status != 200 ){ + alert("The picture could not be printed be : " + response.statusText) + } + } , true) .catch(error => console.error('Error:', error), false); }