We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e892dd commit a33de8cCopy full SHA for a33de8c
src/app/features/issue/providers/jira/jira-api.service.ts
@@ -472,9 +472,12 @@ export class JiraApiService {
472
fetch(url, requestInit)
473
.then((response) => response.body)
474
.then(streamToJsonIfPossible as any)
475
- .then((res) =>
476
- transform ? transform({ response: res }, jiraCfg) : { response: res },
477
- ),
+ .then((res) => {
+ if ((res as any)?.errorMessages?.length) {
+ throw new Error((res as any).errorMessages.join(', '));
478
+ }
479
+ return transform ? transform({ response: res }, jiraCfg) : { response: res };
480
+ }),
481
).pipe(
482
catchError((err) => {
483
console.log(err);
0 commit comments