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

Error: Error: Response for preflight has invalid HTTP status code 401(Solved) #140

Open
hiaux0 opened this issue Sep 1, 2022 · 0 comments

Comments

@hiaux0
Copy link

hiaux0 commented Sep 1, 2022

Nodejs v14.19.1
Typescript v4.7.4
Quokkajs

Steps

  • wrote a script
  • ran with quokkajs
  • encountered issue Error: Error: Response for preflight has invalid HTTP status code 401

I just wanted to open an issue, and also post the solution I found.
This was the comment, that pointed me to the solution
axios/axios#2061 (comment)

const shortcut = new ShortcutClient(SHORTCUT_API_TOKEN, {
  adapter: require('axios/lib/adapters/http'),     // <- add this
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant