mirror of
https://github.com/discordjs/discord.js.git
synced 2024-07-16 07:07:35 +12:00
feat: error handling
This commit is contained in:
parent
f5dd6879a2
commit
7f467ed2d1
|
@ -25,7 +25,8 @@ export async function fetchNode({
|
||||||
);
|
);
|
||||||
|
|
||||||
return JSON.parse(fileContent);
|
return JSON.parse(fileContent);
|
||||||
} catch {
|
} catch (error_) {
|
||||||
|
console.error(error_);
|
||||||
notFound();
|
notFound();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +39,8 @@ export async function fetchNode({
|
||||||
);
|
);
|
||||||
|
|
||||||
return await fileContent.json();
|
return await fileContent.json();
|
||||||
} catch {
|
} catch (error_) {
|
||||||
|
console.error(error_);
|
||||||
notFound();
|
notFound();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,8 @@ export async function fetchSitemap({
|
||||||
);
|
);
|
||||||
|
|
||||||
return JSON.parse(fileContent);
|
return JSON.parse(fileContent);
|
||||||
} catch {
|
} catch (error_) {
|
||||||
|
console.error(error_);
|
||||||
notFound();
|
notFound();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +32,8 @@ export async function fetchSitemap({
|
||||||
);
|
);
|
||||||
|
|
||||||
return await fileContent.json();
|
return await fileContent.json();
|
||||||
} catch {
|
} catch (error_) {
|
||||||
|
console.error(error_);
|
||||||
notFound();
|
notFound();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue