DmitrMakeev commited on
Commit
d1e7442
1 Parent(s): 7119ca7

Update ver2.html

Browse files
Files changed (1) hide show
  1. ver2.html +3 -0
ver2.html CHANGED
@@ -113,6 +113,9 @@
113
  linkPreview: true
114
  })
115
  });
 
 
 
116
  const data = await response.json();
117
  console.log(`Message sent to ${phone}:`, data);
118
  } catch (error) {
 
113
  linkPreview: true
114
  })
115
  });
116
+ if (!response.ok) {
117
+ throw new Error(`HTTP error! status: ${response.status}`);
118
+ }
119
  const data = await response.json();
120
  console.log(`Message sent to ${phone}:`, data);
121
  } catch (error) {