Exit on error

This commit is contained in:
Webifi 2023-06-08 19:54:03 -05:00
parent 4487b920ec
commit 8951a8bf07
1 changed files with 7 additions and 6 deletions

View File

@ -453,7 +453,7 @@
const response = await fetch(getApiBase() + getEndpointCompletions(), fetchOptions) const response = await fetch(getApiBase() + getEndpointCompletions(), fetchOptions)
if (!response.ok) { if (!response.ok) {
await handleError(response) await handleError(response)
} } else {
const json = await response.json() const json = await response.json()
// Remove updating indicator // Remove updating indicator
updating = false updating = false
@ -461,6 +461,7 @@
chatResponse.updateFromSyncResponse(json) chatResponse.updateFromSyncResponse(json)
scrollToBottom() scrollToBottom()
} }
}
} catch (e) { } catch (e) {
// console.error(e) // console.error(e)
updating = false updating = false