-
Notifications
You must be signed in to change notification settings - Fork 21
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
Conversation
✅ Deploy Preview for api-clients-automation canceled.
|
✗ The generated branch has been deleted.If the PR has been merged, you can check the generated code on the |
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
algolia/api-clients-automation#855 Co-authored-by: Clément Vannicatte <[email protected]>
algolia/api-clients-automation#855 Co-authored-by: Clément Vannicatte <[email protected]>
🧭 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#1411Only changes that were added from the first implementation are:
requesterOptions
Side changes
I've also moved the test utils to their own folder as it was becoming redundant
🧪 Test
CI :D