-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Labels
area:coreIssues related to `core`, which is the package that powers the SDKs at runtimeIssues related to `core`, which is the package that powers the SDKs at runtimebugSomething isn't workingSomething isn't working
Description
I'm seeing an error when making multiple authenticated requests as shown below:
const sdk = require('api')('https://docs.readme.com/developers/openapi/5e1a4f6284248b0018149174');
async function run() {
const changelogs = await sdk.auth('API_KEY').getChangelogs()
.then(res => res.json())
.then(res => {
return res;
});
return sdk.auth('API_KEY').getChangelog({ slug: changelogs[0].slug })
.then(res => res.json())
.then(res => {
console.log(res);
});
}
run();I get this error:
TypeError: Cannot read property 'length' of undefined
at authKeys.forEach (code/node_modules/api/src/lib/prepareAuth.js:21:17)
at Array.forEach (<anonymous>)
at module.exports (code/node_modules/api/src/lib/prepareAuth.js:19:12)
at fetchOperation (code/node_modules/api/src/index.js:37:87)
at Object.assign.args (code/node_modules/api/src/index.js:63:22)
at Proxy.<anonymous> (code/node_modules/api/src/index.js:117:33)
at run (code/index.js:10:55)
For some reason, it's having trouble loading securitySchemes here:
api/packages/api/src/lib/prepareAuth.js
Line 21 in cc67a0c
| if (schemes.length > 1) { |
advissor and enewhuis
Metadata
Metadata
Assignees
Labels
area:coreIssues related to `core`, which is the package that powers the SDKs at runtimeIssues related to `core`, which is the package that powers the SDKs at runtimebugSomething isn't workingSomething isn't working