Wrap downloader in a catch

This commit is contained in:
Cameron Redmore 2025-04-26 12:07:42 +01:00
parent c1cff132b3
commit ef002ec79b

View file

@ -16,7 +16,10 @@ export async function getMantisSettings()
if (!MANTIS_API_ENDPOINT || !MANTIS_API_KEY)
{
throw new Error('Mantis API endpoint or key not configured in environment variables.');
return {
url: null,
headers: null,
};
}
const headers = {
Authorization: `${MANTIS_API_KEY}`,
@ -210,6 +213,8 @@ const downloadQueue = [];
export async function setup()
{
try
{
// Initialize the download queue
downloadQueue.length = 0;
@ -234,4 +239,9 @@ export async function setup()
}
}
}
}
catch(error)
{
logger.error('Error setting up Mantis downloader:', error);
}
}