mirror of
https://github.com/Lissy93/web-check.git
synced 2025-08-13 22:38:40 +02:00
Slight improvments to error messaging for sitemap and quality report
This commit is contained in:
@ -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 };
|
||||
}
|
||||
|
Reference in New Issue
Block a user