Skip to content
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

Replacing request library for callbacks with fetch #585

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

phillipperalez
Copy link
Collaborator

Adding ability to check status codes and return proper errors to Looker

@phillipperalez phillipperalez requested a review from a team as a code owner April 5, 2024 19:34
Jonting416
Jonting416 previously approved these changes Apr 5, 2024
lib/hub/action_response.js Outdated Show resolved Hide resolved
src/hub/action_request.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@drstrangelooker drstrangelooker left a comment

Choose a reason for hiding this comment

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

LGTM

Jonting416
Jonting416 previously approved these changes May 9, 2024
Copy link
Contributor

@Jonting416 Jonting416 left a comment

Choose a reason for hiding this comment

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

LGTM but it looks like there are a lot of events that we are no longer supporting (not sure if they are in the new fetch library either) - eg: socket, abort, finish, etc.

@phillipperalez
Copy link
Collaborator Author

From what I could tell node-fetch did not offer the same event granularity as the request library. You do not receive the same type of events and errors will be piped to the catch/reject rather than an event.

src/hub/action_request.ts Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
@@ -42,6 +42,7 @@
"@types/express": "^4.17.17",
"@types/jsforce": "^1.9.33",
"@types/node": "^18.11.11",
"@types/node-fetch": "^2.6.11",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This PR says it's replacing the request library. Can we remove the dependency?

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.

None yet

4 participants