in src/logic/treeherder.ts [70:84]
async function fetchFromTreeherder(url: string) {
const response = await fetch(url);
if (!response.ok) {
if (response.status === 400) {
throw new Error(
`Error when requesting treeherder: ${await response.text()}`,
);
} else {
throw new Error(
`Error when requesting treeherder: (${response.status}) ${response.statusText}`,
);
}
}
return response;
}