Skip to content

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

Open
@hiaux0

Description

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
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions