Skip to content

Commit da58476

Browse files
committed
remove catch statement from FaucetClient
that code was written for axios, not fetch.
1 parent 9ff8496 commit da58476

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

packages/faucet-client/src/faucetclient.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@ export class FaucetClient {
2222
denom: denom,
2323
};
2424

25-
try {
26-
await fetch(this.baseUrl + "/credit", { method: "POST", body: JSON.stringify(body) });
27-
} catch (error: any) {
28-
if (error.response) {
29-
// append response body to error message
30-
throw new Error(`${error}; response body: ${JSON.stringify(error.response.data)}`);
31-
} else {
32-
throw error;
33-
}
34-
}
25+
await fetch(this.baseUrl + "/credit", { method: "POST", body: JSON.stringify(body) });
3526
}
3627
}

0 commit comments

Comments
 (0)