Spaces:
Sleeping
Sleeping
DmitrMakeev
commited on
Commit
•
d1e7442
1
Parent(s):
7119ca7
Update ver2.html
Browse files
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) {
|