(cloudId: string)
| 63 | |
| 64 | transformResponse: async (response: Response, params?: JiraGetProjectParams) => { |
| 65 | const fetchProject = async (cloudId: string) => { |
| 66 | const projectResponse = await fetch(buildProjectUrl(cloudId, params!.projectId), { |
| 67 | method: 'GET', |
| 68 | headers: { |
| 69 | Accept: 'application/json', |
| 70 | Authorization: `Bearer ${params!.accessToken}`, |
| 71 | }, |
| 72 | }) |
| 73 | |
| 74 | if (!projectResponse.ok) { |
| 75 | const errorText = await projectResponse.text() |
| 76 | throw new Error( |
| 77 | parseAtlassianErrorMessage(projectResponse.status, projectResponse.statusText, errorText) |
| 78 | ) |
| 79 | } |
| 80 | |
| 81 | return projectResponse.json() |
| 82 | } |
| 83 | |
| 84 | let data: any |
| 85 |
no test coverage detected