-
Notifications
You must be signed in to change notification settings - Fork 17
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
Fetch API vs Axios #39
Comments
Another reason to support fetch is Axios isn't supported on some runtimes such as Vercel serverless
|
Well this is klaviyo-api-node :P |
Vercel serverless functions execute a Node process: https://vercel.com/docs/functions/runtimes/node-js |
Yeah, maybe @pete183 is referring to Vercel Edge? |
The team is looking into switching to fetch. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would it be possible for future versions of the API to use the standard
fetch
API instead of Axios? From what I've seen Axios is making the API more difficult to work with, as we don't get standard things likeresponse.ok
to check successes with.Another issue is that the errors that come back from the API are nested deep within the
{caught error/response}.response.data.errors
object and it took me forever to realize that I was actually getting error data back. I'd at least like to see a genericKlaviyoApiError
Type exported from the package so we know the shape of the error data that's coming back.The text was updated successfully, but these errors were encountered: