Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Feat/add axios retry and better errors #863

Merged
merged 5 commits into from
Jan 31, 2024

Conversation

DmytroHryshyn
Copy link
Contributor

No description provided.

@DmytroHryshyn DmytroHryshyn requested a review from grzpab January 31, 2024 10:31
axiosRetry(client);

export const DEFAULT_RETRY_COUNT = 3;
export default client;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we call it retryingClient and export it non-defaultly?

package.json Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

License check (no changes, the "red" libraries have been already discussed)
image


expect(fs.writeFile).toBeCalledWith(
'/',
new Uint8Array([84, 101, 115, 116]),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does that mean?

Copy link
Contributor Author

@DmytroHryshyn DmytroHryshyn Jan 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We mock get response with Test string, and expect that writeFile will be called with uint representation of that string. fs.writeFile is mocked, so we can check args it was called with

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, the array in question is basically Test:

new Uint8Array([84, 101, 115, 116]).forEach((x) => console.log(String.fromCharCode(x)))


expect(fs.writeFile).toBeCalledWith(
'/',
new Uint8Array([84, 101, 115, 116]),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, the array in question is basically Test:

new Uint8Array([84, 101, 115, 116]).forEach((x) => console.log(String.fromCharCode(x)))

@DmytroHryshyn DmytroHryshyn merged commit aabaa5b into main Jan 31, 2024
5 checks passed
@DmytroHryshyn DmytroHryshyn deleted the feat/add-axios-retry-and-better-errors branch January 31, 2024 10:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants