You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Checkmate uses Capture as an Infrastructure monitoring agent. The Capture API Response includes errors field to correlate the data that cannot be retrieved. This responses are stored in MongoDB with the same key names, but since the `errors' object is a reserved schema pathname, Mongoose throws a warning as follows.
(node:544409) [MONGOOSE] Warning: `errors` is a reserved schema pathname and may break some functionality. You are allowed to use it, but use at your own risk. To disable this warning pass `suppressReservedKeysWarning` as a schema option.
To Reproduce
Steps to reproduce the behavior:
Go to Server/
Install dependencies npm install
Run npm run dev
Scroll up to head of the logs
See the warning starts with (node:544409) [MONGOOSE] Warning
Expected behavior
Seeing the log messages clearly in the terminal without any errors or warnings.
Spread syntax used here, because all of the keys are same as the Hardware Check Model
If we decide to rename the key, we will no longer be able to use spread syntax on the Hardware Check Module
Yes, spread operator is very clean and useful but I think we should rename the errors with something different. Because of this. I'm not sure about how big is the "Breaking Plugin Functionality" issue.
Describe the bug
Checkmate uses Capture as an Infrastructure monitoring agent. The Capture API Response includes
errors
field to correlate the data that cannot be retrieved. This responses are stored in MongoDB with the same key names, but since the `errors' object is a reserved schema pathname, Mongoose throws a warning as follows.To Reproduce
Steps to reproduce the behavior:
npm install
npm run dev
(node:544409) [MONGOOSE] Warning
Expected behavior
Seeing the log messages clearly in the terminal without any errors or warnings.
Additional context
For more information about reserved keys you can visit MongooseDocs#Schema.reserved
Possible Actions
It will be more useful and safe solution for everyone.
A new version of Capture might be required for the users.
To disable this warning pass
suppressReservedKeysWarning
as a schema option.The text was updated successfully, but these errors were encountered: