Skip to content

Commit

Permalink
fix(FEC-12166): canary not working-error 1006 (#176)
Browse files Browse the repository at this point in the history
Solves FEC-12166
  • Loading branch information
yairans committed Apr 14, 2022
1 parent 4223469 commit 15a81b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/k-provider/common/multi-request-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ export class MultiRequestResult {
const result = response.result ? response.result : response;
const responseArr = Array.isArray(result) ? result : [result];
const results = responseArr.map(result => new ServiceResult(result));
const errorResults = this.results.filter(serviceResult => serviceResult.hasError);
const errorResults = results.filter(serviceResult => serviceResult.hasError);

errorResults.forEach(serviceResult => {
MultiRequestResult._logger.error(
`Service returned an error with error code: ${serviceResult.error.code} and message: ${serviceResult.error.message}.`
);
});

this.results = results;
if ((requestsMustSucceed && errorResults.length) || errorResults.length === this.results.length) {
this.results = results;
this.success = false;
} else {
this.results = this.results.filter(serviceResult => !serviceResult.hasError);
Expand Down

0 comments on commit 15a81b4

Please sign in to comment.