cap-js / notifications

CDS Plugin that provides support for publishing business notifications in SAP Build WorkZone.
https://cap.cloud.sap/docs/
Apache License 2.0
7 stars 1 forks source link

Emit Failed because NotificationType doesn't exists #58

Open Dawood-Ghaznavi opened 2 weeks ago

Dawood-Ghaznavi commented 2 weeks ago

Gives the following error when you try to send a notification: [notifications] - Sending notification of key: Default and version: 1 [persistent-outbox] - Emit failed { event: 'Default', cause: Error: NotificationType with key Default and version 1 does not exist at NotifyToRest.postNotification (/home/user/projects/Student/node_modules/@cap-js/notifications/srv/notifyToRest.js:35:21) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Promise.all (index 0) at async NotifyToRest.handle (/home/user/projects/Student/node_modules/@sap/cds/lib/srv/srv-dispatch.js:65:21) at async ODataRequest. (/home/user/projects/Student/node_modules/@sap/cds/libx/outbox/index.js:286:18) at async ODataRequest.emit (/home/user/projects/Student/node_modules/@sap/cds/lib/req/context.js:58:9) at async ApplicationService.commit (/home/user/projects/Student/node_modules/@sap/cds/lib/srv/srv-tx.js:132:7) at async /home/user/projects/Student/node_modules/@sap/cds/libx/_runtime/cds-services/adapter/odata-v4/handlers/action.js:61:9 { unrecoverable: true } }

joris-vdb commented 2 weeks ago

Please refer to an older similar issue -- https://github.com/cap-js/notifications/issues/44 I was running into the same issue last week, this helped me a lot and got it working now.