(node:2528) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property `currentUser` of 'undefined' or 'null'.
at BasicAuthorizer.getUserName (C:\Users\j\workspace\express-cosmosdb\node_modules\casbin-express-authz\authz.js:46:42)
at BasicAuthorizer.checkPermission (C:\Users\j\workspace\express-cosmosdb\node_modules\casbin-express-authz\authz.js:56:23)
at C:\Users\j\workspace\express-cosmosdb\node_modules\casbin-express-authz\authz.js:26:41
(node:2528) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)
My app.js is the same as the example in docs. How do I solve this error? Should I modify the code under my node_modules? Thanks.
Stack traces:
My
app.js
is the same as the example in docs. How do I solve this error? Should I modify the code under my node_modules? Thanks.