mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat: error handling
This commit is contained in:
@@ -25,7 +25,8 @@ export async function fetchNode({
|
||||
);
|
||||
|
||||
return JSON.parse(fileContent);
|
||||
} catch {
|
||||
} catch (error_) {
|
||||
console.error(error_);
|
||||
notFound();
|
||||
}
|
||||
}
|
||||
@@ -38,7 +39,8 @@ export async function fetchNode({
|
||||
);
|
||||
|
||||
return await fileContent.json();
|
||||
} catch {
|
||||
} catch (error_) {
|
||||
console.error(error_);
|
||||
notFound();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,8 @@ export async function fetchSitemap({
|
||||
);
|
||||
|
||||
return JSON.parse(fileContent);
|
||||
} catch {
|
||||
} catch (error_) {
|
||||
console.error(error_);
|
||||
notFound();
|
||||
}
|
||||
}
|
||||
@@ -31,7 +32,8 @@ export async function fetchSitemap({
|
||||
);
|
||||
|
||||
return await fileContent.json();
|
||||
} catch {
|
||||
} catch (error_) {
|
||||
console.error(error_);
|
||||
notFound();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user