Add basic error handling

+ Add express-async-errors package to handle async errors
+ Add ForwaradableError class (Base class for all project-specific errors)
+ Add defaultErrorHandler middleware which handles errors and sends info to the client
This commit is contained in:
Stephan
2022-04-28 14:39:16 +02:00
parent 4a65dd4665
commit 382a42d439
4 changed files with 60 additions and 0 deletions
+1
View File
@@ -27,6 +27,7 @@
"argon2": "^0.28.2",
"dotenv": "^10.0.0",
"express": "^4.17.1",
"express-async-errors": "^3.1.1",
"jsonwebtoken": "^8.5.1",
"nodemailer": "^6.7.0",
"redis": "^3.1.2"