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;
})
.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);
debug(`Worker ${workerInstance.value.key} is down: ${error}`);
});