forked from pinks/eris
1
0
Fork 0

feat: remove url from error

This commit is contained in:
nameless 2023-11-10 02:47:44 +00:00
parent af7b370321
commit d22848691c
1 changed files with 2 additions and 1 deletions

View File

@ -70,7 +70,8 @@ export async function processGenerationQueue() {
return response; return response;
}) })
.catch((error) => { .catch((error) => {
workerInstance.update({ lastError: { message: error.message, time: Date.now() } }) const cleanedErrorMessage = error.message.replace(/url \([^)]+\)/, "");
workerInstance.update({ lastError: { message: cleanedErrorMessage, time: Date.now() } })
.catch(() => undefined); .catch(() => undefined);
debug(`Worker ${workerInstance.value.key} is down: ${error}`); debug(`Worker ${workerInstance.value.key} is down: ${error}`);
}); });