Add service name and method name to errors in misc services and middleware

This commit is contained in:
Alex Holliday committed 2024-09-15 12:28:11 +08:00
1 parent 0d99f1ac8a
commit 9381f842f3
6 files changed
+21 -3

No files matched your search

+1
View File
@@ -43,6 +43,7 @@ const isAllowed = (allowedRoles) => {
}
} catch (error) {
error.status = 401;
error.method = "isAllowed";
error.service = SERVICE_NAME;
next(error);
return;