Skip to content

Commit

Permalink
CI fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Aug 16, 2023
1 parent 28142c8 commit 09bbe62
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/e2e_aztec_js_browser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ conditionalDescribe()('e2e_aztec.js_browser', () => {
const accounts = await testClient.getAccounts();
const stringAccounts = accounts.map(acc => acc.address.toString());
expect(stringAccounts.includes(result)).toBeTruthy();
});
}, 15_000);

it('Deploys Private Token contract', async () => {
const txHash = await page.evaluate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export async function defaultFetch(host: string, rpcMethod: string, body: any, u
throw new Error(`Failed to parse body as JSON: ${resp.text()}`);
}
if (!resp.ok) {
throw new Error(responseJson.error);
throw new Error(responseJson.error, { cause: 'thrownByServer' });
}

return responseJson;
Expand Down
6 changes: 6 additions & 0 deletions yarn-project/foundation/src/retry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ export async function retry<Result>(
try {
return await fn();
} catch (err: any) {
if (err.cause == 'thrownByServer') {
// If the error is specifically marked as thrown by the server, we don't retry because the error should be
// propagated. This is because it's an "intentional error" (e.g. "Contract is not deployed") and not
// a connection error or an unexpected software bug.
throw err;
}
const s = backoff.next().value;
if (s === undefined) {
throw err;
Expand Down

0 comments on commit 09bbe62

Please sign in to comment.