Skip to content

feat(javascript): add requester-fetch #855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2022

Conversation

shortcuts
Copy link
Member

🧭 What and Why

🎟 JIRA Ticket: https://algolia.atlassian.net/browse/APIC-572

Changes included:

Import fetch requester from the community implementation: algolia/algoliasearch-client-javascript#1411

Only changes that were added from the first implementation are:

  • Use ms for timeouts
  • Allow overriding default requesterOptions

Side changes

I've also moved the test utils to their own folder as it was becoming redundant

🧪 Test

CI :D

@shortcuts shortcuts requested a review from a team July 21, 2022 12:25
@shortcuts shortcuts self-assigned this Jul 21, 2022
@shortcuts shortcuts requested review from damcou and millotp and removed request for a team July 21, 2022 12:25
@netlify
Copy link

netlify bot commented Jul 21, 2022

Deploy Preview for api-clients-automation canceled.

Name Link
🔨 Latest commit ecc86bc
🔍 Latest deploy log https://app.netlify.com/sites/api-clients-automation/deploys/62d945afb1e5450008f47810

@algolia-bot
Copy link
Collaborator

algolia-bot commented Jul 21, 2022

✗ The generated branch has been deleted.

If the PR has been merged, you can check the generated code on the main branch.
You can still access the code generated on main via this commit.

@shortcuts shortcuts marked this pull request as ready for review July 21, 2022 12:42
Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

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

Everything looks good ! Just a small question about fetch

},
});
} catch (error) {
return {
Copy link
Collaborator

Choose a reason for hiding this comment

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

doesn't 400 errors also end up here ? In that case we should have a status code

Copy link
Member Author

Choose a reason for hiding this comment

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

doesn't 400 errors also end up here ?

Those errors are actually forwarded a bit below, in each requester there is this notion of global error that returns a 0 error, I don't have more context on this part but it seems to correctly forward 400s if you check the tests

@shortcuts shortcuts merged commit d93227c into main Jul 21, 2022
@shortcuts shortcuts deleted the feat/javascript-import-requester-fetch branch July 21, 2022 16:14
algolia-bot added a commit to algolia/algoliasearch-client-javascript that referenced this pull request Jul 21, 2022
medicindev pushed a commit to medicindev/Algolia-Client--JavaScript that referenced this pull request Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants