Slight improvments to error messaging for sitemap and quality report

This commit is contained in:
Alicia Sykes
2024-03-14 07:59:03 +00:00
parent 41cd379805
commit ee74c5866a
3 changed files with 10 additions and 9 deletions

View File

@ -39,10 +39,8 @@ const handler = async (url) => {
return sitemap;
} catch (error) {
// If error occurs
console.log(error.message);
if (error.code === 'ECONNABORTED') {
return { error: 'Request timed out' };
return { error: 'Request timed out after 5000ms' };
} else {
return { error: error.message };
}