I am trying to set up a Supabase edge function that creates a Jira issue and adds relevant attachments, using the jira.js library.
Creating the issue works as expected, but I am getting the following 500 error when attempting to add attachments to the created issue using the library's `client.issueAttachments.addAttachment` function.
Error: https://gist.github.com/justinsmid/85eee719fa9771d5c2c3c4f255a12812
Since the error I was getting really didn't seem to have any useful information, I figured I would instead try doing the request manually, so I copy-pasted the library's function, and got the same error.
After some fiddling, I noticed that removing the Content-Type: "multipart/form-data" header got rid of the error, and now the attachments were being added successfully.
...why?
I don't think it's entirely on the Content-Type header, because I have also previously used the jira.js library in a separate nextjs project, and there the `addAttachment` function works fine, without any adjustments. So it seems to be a combination of the header and calling it from a Supabase edge function.