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
Describe the bug
When the privacy policies doc lacks the privacy_policies property, API logs an error. However this error is not critical and does not inform the user of what they should do.
An empty privacy policies doc can come from an incomplete, but not incorrect configuration.
This creates noise and confusion, and gets reported as the reason why API crashed.
To Reproduce
Steps to reproduce the behavior:
In your config folder, create a privacy-policies.json file, but leave it empty.
Upload thid config.
Relaunch API.
See error
Expected behavior
This should be logged as a warning, or inform the user on what to do.
Logs
2024-10-11T08:30:29.645 ERROR: Error retrieving privacy policies: Error: Invalid privacy-policies doc: missing required "privacy_policies" property
at /service/api/src/services/privacy-policy.js:25:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 3)
at async getLoginPageContents (/service/api/src/generate-service-worker.js:53:10)
at async writeServiceWorkerFile (/service/api/src/generate-service-worker.js:101:23)
at async Object.run (/service/api/src/generate-service-worker.js:154:5)
at async /service/api/server.js:91:5 {
[stack]: 'Error: Invalid privacy-policies doc: missing required "privacy_policies" property\n' +
' at /service/api/src/services/privacy-policy.js:25:15\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
' at async Promise.all (index 3)\n' +
' at async getLoginPageContents (/service/api/src/generate-service-worker.js:53:10)\n' +
' at async writeServiceWorkerFile (/service/api/src/generate-service-worker.js:101:23)\n' +
' at async Object.run (/service/api/src/generate-service-worker.js:154:5)\n' +
' at async /service/api/server.js:91:5',
[message]: 'Invalid privacy-policies doc: missing required "privacy_policies" property'
}
Environment
App: api
Version: 4.0.0
The text was updated successfully, but these errors were encountered:
dianabarsan
changed the title
API logs error when privacy policies doc is malformed
API logs error when privacy policies doc contains no privacy policies
Oct 11, 2024
Describe the bug
When the privacy policies doc lacks the
privacy_policies
property, API logs an error. However this error is not critical and does not inform the user of what they should do.An empty privacy policies doc can come from an incomplete, but not incorrect configuration.
This creates noise and confusion, and gets reported as the reason why API crashed.
To Reproduce
Steps to reproduce the behavior:
privacy-policies.json
file, but leave it empty.Expected behavior
This should be logged as a warning, or inform the user on what to do.
Logs
Environment
The text was updated successfully, but these errors were encountered: