cap-js / attachments

The @cap-js/attachments package is a CDS plugin that provides out-of-the box asset storage and handling by using an aspect Attachments. It also provides a CAP-level, easy to use integration of the SAP Object Store.
Apache License 2.0
6 stars 4 forks source link

Note cannot be added in draft mode #62

Open ch-sap opened 3 weeks ago

ch-sap commented 3 weeks ago

Hi,

we have a CAP/Fiori Elements application with cap-js/attachment and deployed it to cloud foundry. We used object store to save the attachments.

The attachment association is added to an entity which is draft-enabled.

The attachment reuse UI is shown and I could successfully upload and save a text file. But when I edit the entity, add a note to the attachment and save the draft, I get an error.

The CF log shows me: 1279878","x_sf_correlation_id":"8470c2d2-c147-4415-778e-248eb64c1b7b","x_vcap_request_id":"8470c2d2-c147-4415-778e-248eb64c1b7b","request_id":"8470c2d2-c147-4415-778e-248eb64c1b7b","x_correlation_id":"8470c2d2-c147-4415-778e-248eb64c1b7b","timestamp":"2024-06-10T09:24:43.005Z","msg":"❗️Uncaught Transaction is already closed","stacktrace":["Error: Transaction is already closed","at /home/vcap/app/node_modules/@sap/cds/libx/_runtime/hana/execute.js:162:36","at Statement.handle (/home/vcap/app/node_modules/hdb/lib/protocol/Statement.js:91:3)","at handleReply (/home/vcap/app/node_modules/hdb/lib/Client.js:278:15)","at receive (/home/vcap/app/node_modules/hdb/lib/util/Queue.js:114:18)","at Connection.receive (/home/vcap/app/node_modules/hdb/lib/protocol/Connection.js:394:5)","at TLSSocket.ondata (/home/vcap/app/node_modules/hdb/lib/protocol/Connection.js:243:12)","at TLSSocket.emit (node:events:517:28)","at addChunk (node:internal/streams/readable:368:12)","at readableAddChunk (node:internal/streams/readable:341:9)","at Readable.push (node:internal/streams/readable:278:10)"],"numericSeverity":4,"layer":"cds","component_type":"application","container_id":"10.0.137.29","component_id":"9fb24712-c733-4732-b24e-8707faff7bb4","component_name":"poetry-slams-srv","component_instance":0,"source_instance":0,"organization_name":"ch-erp","organization_id":"d3b1e418-87fc-474e-a57a-194a92487727","space_name":"dev","space_id":"8274bb9f-a1db-485d-ad43-eb13ff033823","tenant_subdomain":"ch-erp-prv","type":"log"}

Could you please give advice?

Best regards, Christine