(cloudId: string)
| 57 | |
| 58 | transformResponse: async (response: Response, params?: JiraGetFieldsParams) => { |
| 59 | const fetchFields = async (cloudId: string) => { |
| 60 | const fieldsResponse = await fetch(buildFieldsUrl(cloudId), { |
| 61 | method: 'GET', |
| 62 | headers: { |
| 63 | Accept: 'application/json', |
| 64 | Authorization: `Bearer ${params!.accessToken}`, |
| 65 | }, |
| 66 | }) |
| 67 | |
| 68 | if (!fieldsResponse.ok) { |
| 69 | const errorText = await fieldsResponse.text() |
| 70 | throw new Error( |
| 71 | parseAtlassianErrorMessage(fieldsResponse.status, fieldsResponse.statusText, errorText) |
| 72 | ) |
| 73 | } |
| 74 | |
| 75 | return fieldsResponse.json() |
| 76 | } |
| 77 | |
| 78 | let data: any |
| 79 |
no test coverage detected