diff options
| author | Ritesh Ghosh <[email protected]> | 2024-10-06 01:13:23 +0530 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-10-06 01:13:23 +0530 |
| commit | 46f688ac12a99b8fb145b0745dd4cc6babff1e1e (patch) | |
| tree | 9560dd057822069a2162ef01a1118f3ac05e6d07 /src/config/errorHandler.ts | |
| parent | 55810ccf2372209f9b46c96ac12811e5a05f7961 (diff) | |
| download | aniwatch-api-46f688ac12a99b8fb145b0745dd4cc6babff1e1e.tar.xz aniwatch-api-46f688ac12a99b8fb145b0745dd4cc6babff1e1e.zip | |
Aniwatch API Version 2 (#66)
BREAKING CHANGE:
* chore: remove files that are not necessary for api v2
* test: update existing tests to use pkg
* feat: organized aniwatch api envs and add more info about them
* feat: update tsconfig to include strict noUnsed params
* feat(api homepage): revamp api home page
* feat: update wani kuni image
* feat: add dot img
* feat: use hono cors
* feat: use hono rate limiter
* build: remove unnecessary deps, add ones needed and update description
* feat: add hianime routes and their handlers
* feat: update vercel deployment file
* docs: update logo and scraper docs, add envs section
* feat: update main server file
* feat: update peronal deployments caution section
Diffstat (limited to 'src/config/errorHandler.ts')
| -rw-r--r-- | src/config/errorHandler.ts | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/config/errorHandler.ts b/src/config/errorHandler.ts deleted file mode 100644 index 560f141..0000000 --- a/src/config/errorHandler.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { ErrorRequestHandler } from "express"; - -const errorHandler: ErrorRequestHandler = (error, req, res, next) => { - const status = error?.status || 500; - res.status(status).json({ - status, - message: error?.message || "Something Went Wrong", - }); -}; - -export default errorHandler; |
