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
We are migrating our Audit Logging from @sap/audit-logging to @cap-js/audit-logging but have encountered some sort of issue we cannot find a solution for.
Some quick background, our Entity initially used an Integer for the Key and it seems that the Cap Audit Logging did not work with the DataSubjectId being an Integer. It does not seem to get passed via the DataSubject { Id: }
property. So we added a UUID to the Entity and the CAP Audit Logging works as expected for any new Entity created after this deployment.
We then created a script to update the UUID in all existing entities. So after the successfuly execution of this script, all existing Routes have a UUID. Which we have verified. But when we do any data modification on any existing Route, whereby we added a UUID via the script, we receive the following error :
"msg":"Emit failed {\n event: 'PersonalDataModified',\n cause: Error: Request failed with status 400\n at IncomingMessage.<anonymous> (/home/vcap/app/node_modules/@cap-js/audit-logging/srv/log2restv2.js:162:23)\n at /home/vcap/app/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813/any/nodejs/nodejsagent.js:2267:48\n at t.runInContext (/home/vcap/app/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813/any/nodejs/nodejsagent.js:2378:24)\n at IncomingMessage.<anonymous> (/home/vcap/app/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813/any/nodejs/nodejsagent.js:2267:18)\n at IncomingMessage.emit (node:events:531:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at /home/vcap/app/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813/any/nodejs/nodejsagent.js:2267:48\n at t.runInContext (/home/vcap/app/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813/any/nodejs/nodejsagent.js:2378:24)\n at endReadableNT (/home/vcap/app/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813/any/nodejs/nodejsagent.js:2267:18)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {\n request: {\n method: 'POST',\n url: 'https://api.auditlog.cf.eu10.hana.ondemand.com:8081/audit-log/oauth2/v2/data-modifications',\n headers: [Object],\n body: [Object]\n },\n response: {\n statusCode: 400,\n statusMessage: '',\n headers: [Object],\n body: [Object]\n },\n unrecoverable: true\n }\n}","type":"log"}
But when we do any data modification on any route we create after our changes have been deployed, the audit log does not fail to emit with a 400 and instead we can actually see the audit log event in the audit log service.
Can you provide any guidence here please?
Kind regards,
Keith.
The text was updated successfully, but these errors were encountered:
Keith-Barrett
changed the title
Bad Request When Writing Data Modification To api.auditlog.cf For Existing Routes
Bad Request When Writing Data Modification To api.auditlog.cf For Entity
Nov 19, 2024
the 400 is a result of data_subject: { id: {}, .... however, integer keys are supported, so there must be a different issue. i'd need steps on how to reproduce...
Hello Experts,
We are migrating our Audit Logging from @sap/audit-logging to @cap-js/audit-logging but have encountered some sort of issue we cannot find a solution for.
Some quick background, our Entity initially used an Integer for the Key and it seems that the Cap Audit Logging did not work with the DataSubjectId being an Integer. It does not seem to get passed via the DataSubject { Id: }
property. So we added a UUID to the Entity and the CAP Audit Logging works as expected for any new Entity created after this deployment.
You can read more about that here if needed :
https://sap.stackenterprise.co/questions/62533
We then created a script to update the UUID in all existing entities. So after the successfuly execution of this script, all existing Routes have a UUID. Which we have verified. But when we do any data modification on any existing Route, whereby we added a UUID via the script, we receive the following error :
"msg":"Emit failed {\n event: 'PersonalDataModified',\n cause: Error: Request failed with status 400\n at IncomingMessage.<anonymous> (/home/vcap/app/node_modules/@cap-js/audit-logging/srv/log2restv2.js:162:23)\n at /home/vcap/app/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813/any/nodejs/nodejsagent.js:2267:48\n at t.runInContext (/home/vcap/app/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813/any/nodejs/nodejsagent.js:2378:24)\n at IncomingMessage.<anonymous> (/home/vcap/app/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813/any/nodejs/nodejsagent.js:2267:18)\n at IncomingMessage.emit (node:events:531:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at /home/vcap/app/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813/any/nodejs/nodejsagent.js:2267:48\n at t.runInContext (/home/vcap/app/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813/any/nodejs/nodejsagent.js:2378:24)\n at endReadableNT (/home/vcap/app/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813/any/nodejs/nodejsagent.js:2267:18)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {\n request: {\n method: 'POST',\n url: 'https://api.auditlog.cf.eu10.hana.ondemand.com:8081/audit-log/oauth2/v2/data-modifications',\n headers: [Object],\n body: [Object]\n },\n response: {\n statusCode: 400,\n statusMessage: '',\n headers: [Object],\n body: [Object]\n },\n unrecoverable: true\n }\n}","type":"log"}
But when we do any data modification on any route we create after our changes have been deployed, the audit log does not fail to emit with a 400 and instead we can actually see the audit log event in the audit log service.
Can you provide any guidence here please?
Kind regards,
Keith.
The text was updated successfully, but these errors were encountered: