Undocumented: Error 415 When Trying to Delete Components

Hi,

I am trying to delete several components by id as per the documentation:

delete: async (args) => {
  console.log('API', 'components delete')
  console.log(args);
  const response = await requestJira(`/rest/api/3/component/${args}`, {
    method: 'DELETE'
  });
  
  console.log(`Response: ${response.status} ${response.statusText}`);
  console.log(await response.text());
}

which I call here:

for (const component of componentsToDelete) {
  await api.components.delete(component.id)
}

The response I get is:

index.js:77 API components delete
index.js:78 11720
index.js:83 Response: 415 
index.js:76 
index.js:77 API components delete
index.js:78 11717
index.js:83 Response: 415 
index.js:76 
index.js:77 API components delete
index.js:78 11722
index.js:83 Response: 415 
index.js:76 
index.js:77 API components delete
index.js:78 11715
index.js:83 Response: 415 
index.js:76 
index.js:77 API components delete
index.js:78 11716
index.js:83 Response: 415 

It’s a 415 with no message. https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-components/#api-rest-api-3-component-id-delete does not contain documentation for 415.

What is the issue?

Hi @AbdullahTayeh
Thanks for reaching out. Can you please give me some more details:
Does args stand for component id - type string?
Is it done via api.asUser()?

Regards
Magdalena Lidia Rogulska

@MagdalenaRogulska hi, thanks for your reply.
yes, args is the component id, as show in the log it gets printed correctly.

I am not using api, as I am calling this directly with requestJira from the frontend (forge/bridge).