I’m trying to modify the data-connector-example code to import issues from Linear rather than folders, and show them in the data linking panel in the same way, with parentId.
I could get OAuth to Linear and getting the data from it to work fine, code at https://github.com/ShoggothAI/sample-lucid-extensions/tree/linear/linear-connector-example
However when the code tries to insert the data so it’s visible in the Data Linking Panel, I keep getting the error
Listening on port 3002
Linear Import initiated
Fetching issues from Linear
Successfully retrieved issues from Linear GraphQL API
Error encountered when updating Linear collections DataConnectorRequestError: updating data source
at throwUnsuccessful (/home/.../tweaked-lucid-extensions/linear-connector-example/dataconnectors/linear-connector/node_modules/lucid-extension-sdk/dataconnector/throwunsuccessful.js:8:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DataSourceClient.update (/home/.../tweaked-lucid-extensions/linear-connector-example/dataconnectors/linear-connector/node_modules/lucid-extension-sdk/dataconnector/datasourceclient.js:60:9) {
status: 500,
response: 'Unable to save changes to document: e7f3bbf0-7e3b-4b1d-a89b-566cb391169a. Reason: 400-{"b9e7251b-03c6-b403-270e-5a73ed9741cb":"Item - {\\"linearId\\":\\"75f46911-f590-4698-bab0-3c73d0597875\\",\\"title\\":\\"Test Issue for Attachments d5f61612\\",\\"parentId\\":null} - was sent with the incorrect key 75f46911-f590-4698-bab0-3c73d0597875 expected \\"75f46911-f590-4698-bab0-3c73d0597875\\". To change keys use ItemsTransferred"}',
statusText: 'Internal Server Error'
}
The code there is as similar to the one for importing Lucid folders in the example as I can make it, yet the latter runs fine and this one breaks. Any idea how to fix that?
Thanks a lot!