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 2a53ba6826
commit 55c6b91b37
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}`);
});