Skip to content

Commit

Permalink
fix: log errors instead of throwing new errors (#47)
Browse files Browse the repository at this point in the history
- needs more attention but as of right now it was crashing the server
  • Loading branch information
hmbakhsh authored Aug 20, 2024
1 parent 957263d commit c45a1cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/models/userMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ export class UserMethods {
return true;
} catch (error) {
if (error instanceof Error) {
throw new Error(error.message);
console.error(error);
}
throw new Error(`Unknown Error: ${error}`);
console.error(`Unknown Error: ${error}`);
}
}

Expand Down

0 comments on commit c45a1cf

Please sign in to comment.