Check for response ok
| @@ -1249,6 +1249,7 @@ async function getStatusTextgen() { | ||
| 1249 | 1249 | }), |
| 1250 | 1250 | }); |
| 1251 | 1251 | |
| 1252 | + if (response.ok) { | |
| 1252 | 1253 | const data = await response.json(); |
| 1253 | 1254 | if (data) { |
| 1254 | 1255 | const { chat_template, chat_template_hash } = data; |
| @@ -1265,6 +1266,7 @@ async function getStatusTextgen() { | ||
| 1265 | 1266 | } |
| 1266 | 1267 | } |
| 1267 | 1268 | } |
| 1269 | + } | |
| 1268 | 1270 | |
| 1269 | 1271 | // We didn't get a 200 status code, but the endpoint has an explanation. Which means it DID connect, but I digress. |
| 1270 | 1272 | if (online_status === 'no_connection' && data.response) { |