Skip to content

Commit

Permalink
fix(company-house): updated snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi-markan committed Jul 31, 2024
1 parent c66bb6a commit 582489c
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ export const createWrapCompaniesHouseHttpGetErrorCallback =
({ messageForUnknownError, knownErrors }: { messageForUnknownError: string; knownErrors: KnownErrors }): CompaniesHouseHttpErrorCallback =>
(error: Error) => {
if (error instanceof AxiosError && error?.response) {
knownErrors.forEach(({ checkHasError, throwError }) => {
if (checkHasError(error) && throwError(error)) {
return throwError(error);
}
});
knownErrors.forEach(({ checkHasError, throwError }) => checkHasError(error) && throwError(error));
}

return throwError(() => new CompaniesHouseException(messageForUnknownError, error));
Expand Down

0 comments on commit 582489c

Please sign in to comment.