mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix server crash if request was aborted during out of quota retry
This commit is contained in:
@@ -1182,6 +1182,7 @@ router.post('/generate', jsonParser, function (request, response) {
|
||||
*/
|
||||
async function makeRequest(config, response, request, retries = 5, timeout = 5000) {
|
||||
try {
|
||||
controller.signal.throwIfAborted();
|
||||
const fetchResponse = await fetch(endpointUrl, config);
|
||||
|
||||
if (request.body.stream) {
|
||||
|
Reference in New Issue
Block a user