Skip to content

Commit

Permalink
created new error handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
Danijel-Enoch committed Nov 19, 2023
1 parent e285984 commit 8decdf1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions errors/api.error.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export async function APIERROR() {
return "ERROR OCCURRED WHEN FETCHING DATA";
}
6 changes: 6 additions & 0 deletions errors/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
export * from "./login.error";
export * from "./api.error";
export * from "./web3.error";

export async function GenericError(msg: string) {
console.log(`API ERROR: ${msg}`);
}
3 changes: 3 additions & 0 deletions errors/web3.error.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export async function WEB3ERROR() {
return "Blockchain error occured";
}

0 comments on commit 8decdf1

Please sign in to comment.