Ma-Kas / kansaibeyond

Monorepo for a blog and travel website, consisting of frontend, backend, and headless cms.
https://www.kansaibeyond.com
0 stars 0 forks source link

(be): Add custom error handler middleware #11

Closed Ma-Kas closed 7 months ago

Ma-Kas commented 7 months ago

Implement errorHandler middleware to handle error thrown in routes; Implement extendable custom error class; Extend custom error class with BadRequestError, NotFoundError, UnauthorizedError to throw with appropriate response code and message;