mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 13:43:06 -04:00
fix bot crashing when very specific errors get thrown
This commit is contained in:
parent
f642054f0d
commit
2e523b1dad
2 changed files with 10 additions and 5 deletions
|
@ -138,6 +138,8 @@ commandClient.on('commandRunError', async ({context, error}) => {
|
|||
return;
|
||||
}
|
||||
|
||||
console.error(error ? error.stack || error.message : error);
|
||||
|
||||
// Log the error via our maintower service
|
||||
let packages = {
|
||||
data: {},
|
||||
|
@ -182,6 +184,8 @@ interactionClient.on('commandRunError', async ({context, error}) => {
|
|||
return;
|
||||
}
|
||||
|
||||
console.error(error ? error.stack || error.message : error);
|
||||
|
||||
// Log the error via our maintower service
|
||||
let packages = {
|
||||
data: {},
|
||||
|
@ -232,7 +236,8 @@ interactionClient.on('commandRunError', async ({context, error}) => {
|
|||
});
|
||||
|
||||
cluster.on(ClientEvents.WARN, async ({error}) => {
|
||||
if(!process.env.MAINTOWER_URL) { console.warn(error); return; }
|
||||
console.warn(error);
|
||||
if(!process.env.MAINTOWER_URL) return;
|
||||
await basecamp(formatErrorMessage(2, "CLUSTER_WARNING", `\`Cluster ${cluster.manager.clusterId} reported warning\`:\n\`\`\`${error}\`\`\``));
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue