Closed dallinbjohnson closed 4 years ago
clearRulesFromCache: async function (hook) { const rulesCacheMap = rulesCache.rulesCacheMap; if (!rulesCacheMap) return; try { const hookType = hook.type; const method = hook.method; if (hookType === 'after' && ['patch', 'update', 'remove'].includes(method)) { rulesCacheMap.reset(); hook.app.info(`feathers-mongoose-casl - rulesCache hook - remove rules from cache after ${method}`); } return hook; } catch (error) { hook.app.error('feathers-mongoose-casl - rulesCache hook error', error); } },
We put a brake point on this code: This errors out with info not being a function error.
hook.app.info(`feathers-mongoose-casl - rulesCache hook - remove rules from cache after ${method}`)
{ "name": "GeneralError", "message": "error hook for 'patch' method returned invalid hook object", "code": 500, "className": "general-error", "data": {}, "errors": {} }
server/node_modules/feathers-mongoose-casl/lib/src/hooks/cache/rulesCache.js
We put a brake point on this code: This errors out with info not being a function error.
Error from Postman