I am trying to run this example:
https://bitbucket.org/atlassian/forge-attachment-count-custom-field/src/master/
When I run the web trigger with this command:
curl -X POST <url> -H "Content-Type: application/json" -d '{"startAt":0, "maxResults": 1000}'
I get the following error:
{"timestamp":"2024-09-19T14:07:48.478+00:00","path":"/x1/_kbc2N2bDYqdgxkcLB470IVc7EY","status":424,"error":"Failed Dependency","requestId":"24796d3c-858976"
and in the tunnel, I get the following:
INFO 16:07:14.426 ab72e692-8a7f-4da5-8564-81bc8f1b885f REQUEST: POST [object Object] {"expression":"issues.reduce((acc, i) => acc.set(i.attachments.length+'', (acc[i.attachments.length+''] || []).concat(i.id)), {})","context":{"issues":{"jql":{"query":"order by id","startAt":0,"maxResults":1000}}}}
ERROR 16:07:14.904 ab72e692-8a7f-4da5-8564-81bc8f1b885f FetchError: invalid json response body at https://jira/rest/api/2/expression/eval reason: Unexpected end of JSON input
at <anonymous> (webpack://jira-custom-field-ui-kit-2/node_modules/node-fetch/lib/index.mjs:267:1)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.setUpAttachmentCount (webpack://jira-custom-field-ui-kit-2/src/attachments.js:20:1)
at async /tmp/tunnel-563429-mfUk0COR6kbp/attachments.cjs:2:511617
at async process.<anonymous> (/home/anders/.nvm/versions/node/v20.17.0/lib/node_modules/@forge/cli/node_modules/@forge/tunnel/out/sandbox/sandbox-runner.js:7:20) {
type: 'invalid-json'
}
Does anyone have an idea to what I am doing wrong?
Thanks in advance