I cant get ticket / issue status in Atlassian forge

I am trying to get issue status in atlassian forge but i cant get it

resolver.define('getJiraFields', async (id) => {
 
  const response = await api.asUser().requestJira(route`/rest/api/3/statuses?id=${id}`, {
    headers: {
      'Accept': 'application/json'
    }
  });

  if (!response) {
    throw new Error('No response received');
  }

  const fields = await response.json();

  if (!fields) {
    throw new Error('Failed to parse response as JSON');
  }

  return fields;
});

also its being called as

 const getFieldInfo = async (id) => {
    try {
      console.log('idd',id, 'ticketId', ticketId, typeof`${ticketId}`,typeof id);
      const fieldData = await invoke('getJiraFields');
      console.log(`Field info:`, fieldData);
      setFieldData(fieldData);
    } catch (error) {
      console.error('Error fetching field info:', error);
  }
};

I always get the Error :: errorMessages: [‘getStatuses.ids: Invalid format’]
errors: {}

in manifest.yml i have
image

Help me please!!!

Hi @shubhankarkumarsingh ,

If this is actual code, it’s likely that you forgot to pass parameters to the invoke function. As a result, the id is undefined within the invoke definition.

Instead of this:

You should have something like:

const fieldData = await invoke('getJiraFields', id);