Skip to content

Commit

Permalink
fix: catcher throw errors
Browse files Browse the repository at this point in the history
* fix: demanding requests error handling to the caller

* fix: applied same behaviour to xml requests

* fix: catcher throw errors
  • Loading branch information
nubsthead authored Mar 10, 2022
1 parent 7f065a8 commit eafc584
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/network/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ export const getSoapFetch =
}) // TODO proper error handling
.then((res) => res?.json())
.then((res: SoapResponse<Response>) => handleResponse(api, res, set, get))
.catch((e) => report(app)(e)) as Promise<Response>;
.catch((e) => {
report(app)(e);
throw e;
}) as Promise<Response>;

export const getXmlSoapFetch =
(app: string, set: SetState<AccountState>, get: GetState<AccountState>) =>
Expand Down

0 comments on commit eafc584

Please sign in to comment.