mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Check for response ok
This commit is contained in:
@ -1249,6 +1249,7 @@ async function getStatusTextgen() {
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (response.ok) {
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
if (data) {
|
if (data) {
|
||||||
const { chat_template, chat_template_hash } = data;
|
const { chat_template, chat_template_hash } = data;
|
||||||
@ -1265,6 +1266,7 @@ async function getStatusTextgen() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// We didn't get a 200 status code, but the endpoint has an explanation. Which means it DID connect, but I digress.
|
// We didn't get a 200 status code, but the endpoint has an explanation. Which means it DID connect, but I digress.
|
||||||
if (online_status === 'no_connection' && data.response) {
|
if (online_status === 'no_connection' && data.response) {
|
||||||
|
Reference in New Issue
Block a user