Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,13 @@ export default class Request {
Accept: 'application/json'
}
};
return this.json(url, options);
const data = await this.json(url, options);
if (data?.errors) {
throw new Error(
`Request to fetch triaged reports failed with: ${JSON.stringify(data.errors)}`
);
}
return data;
}

async getPrograms() {
Expand Down
Loading