adobe / adobe/aem-headless-client-nodejs
originalFetch is not a function
- Dominant language
- JavaScript
- Stars
- 16
- Forks
- 2
- Avg merge
- 7h 48m
- Merged PRs (30d)
- 2
Description
### Expected Behaviour
### Actual Behaviour
### Reproduce Scenario (including but not limited to)
#### Steps to Reproduce
const proxyFetch = createFetch();
const aemHeadlessClient = new AEMHeadless({
serviceURL: ' ',
endpoint: '/content/_cq_graphql/global/endpoint.json',
fetch: proxyFetch,
headers: {'content-type': 'application/json', 'accept': 'application/json'},
// auth: ['admin', 'admin'],
//auth: [AEM_USER, AEM_PASS],
// headers: {'customerheadername': 'customerheadervalue'}
});
aemHeadlessClient.runQuery(`query homePageQueery {
homepageFragmentList {
items {
_path
title
}
}
}`)
.then(data =>
console.log(data))
.catch(e =>
console.error(e))
#### Platform and Version
#### Sample Code that illustrates the problem
#### Logs taken while reproducing problem
AioCoreSDKError [AEMHeadlessError]: [AEMHeadless:REQUEST_ERROR] General Request error: originalFetch is not a function.
code: 'REQUEST_ERROR',
sdk: 'AEMHeadless',
Contributor guide
Research direction
Start with the createFetch() value passed to AEMHeadless and the request path used by runQuery; inspect how the SDK invokes the custom fetch. Reproduce the reported “originalFetch is not a function” error and confirm the request completes with the supplied proxy fetch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100