Check for response ok

2e661c36e5067de68bd6fd8b470c27a8e35c2264

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -0Showing whitespace changes
public/script.js+2 -0
@@ -1249,6 +1249,7 @@ async function getStatusTextgen() {
12491249 }),
12501250 });
12511251
1252+ if (response.ok) {
12521253 const data = await response.json();
12531254 if (data) {
12541255 const { chat_template, chat_template_hash } = data;
@@ -1265,6 +1266,7 @@ async function getStatusTextgen() {
12651266 }
12661267 }
12671268 }
1269+ }
12681270
12691271 // We didn't get a 200 status code, but the endpoint has an explanation. Which means it DID connect, but I digress.
12701272 if (online_status === 'no_connection' && data.response) {