Skip to content

Commit

Permalink
Replace err with warn on API error so that the bot doesn't crash
Browse files Browse the repository at this point in the history
  • Loading branch information
fowled committed Jan 6, 2023
1 parent feed6b6 commit 4d23314
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 178 deletions.
4 changes: 2 additions & 2 deletions app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import cors from "cors";

import { getUsersCount } from "utils/usersCount";
import { timestampYear } from "utils/timestamp";
import { log, error } from "utils/logger";
import { log, warn } from "utils/logger";

import { Command } from "interfaces/Command";
import { Event } from "interfaces/Event";
Expand Down Expand Up @@ -67,7 +67,7 @@ function binder() {

function handleRejections() {
process.on("unhandledRejection", (err: Error) => {
error(err.stack);
warn(err.stack);
});
}

Expand Down
Loading

0 comments on commit 4d23314

Please sign in to comment.