Skip to content

Commit

Permalink
fix broken axios stack traces
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Feb 13, 2024
1 parent 68193b5 commit ae95a0d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/helpers/functions/errorHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,7 @@ export async function errorHandler(client: Client, error: any, type: string) {
let description = error.stack;
let codeBlocks = "";

if (error.isAxiosError) {
// axios errors are JSON
description = JSON.stringify(error.toJSON());
eprotoError = error.code === "EPROTO";
codeBlocks = "json";
} else if (!description) {
if (!description) {
// no stack trace so it's JSON
description = JSON.stringify(error);
codeBlocks = "json";
Expand Down

0 comments on commit ae95a0d

Please sign in to comment.