We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 265bf62 commit 1f6bcf6Copy full SHA for 1f6bcf6
1 file changed
lib/request.js
@@ -158,7 +158,13 @@ export default class Request {
158
Accept: 'application/json'
159
}
160
};
161
- return this.json(url, options);
+ const data = await this.json(url, options);
162
+ if (data?.errors) {
163
+ throw new Error(
164
+ `Request to fetch triaged reports failed with: ${JSON.stringify(data.errors)}`
165
+ );
166
+ }
167
+ return data;
168
169
170
async getPrograms() {
0 commit comments