adobe / aem-headless-client-js

AEM Headless Client for JavaScript
Apache License 2.0
25 stars 12 forks source link

Cannot get any content fragment on publish instance #52

Closed alexisle-roy closed 4 months ago

alexisle-roy commented 1 year ago

Expected Behaviour

Being able to retrieve created content fragment from a publish instance

Actual Behaviour

When trying to query the publish instance, i get this error:

AioCoreSDKError [AEMHeadlessError]: [AEMHeadless:REQUEST_ERROR] General Request error: Request failed with status code 404 Not Found.
    at new <anonymous> (/Users/username/Library/Documents/my-project/node_modules/.pnpm/@adobe+aio-lib-core-errors@3.1.1/node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js:33:9)
    at AEMHeadless.__handleRequest (/Users/username/Library/Documents/my-project/node_modules/.pnpm/@adobe+aem-headless-client-js@3.3.0/node_modules/@adobe/aem-headless-client-js/src/index.js:316:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.runQuery (webpack-internal:///../../libs/bp-front/shared/http/src/graphqlClient.ts:52:35)
    at async getPushContent (webpack-internal:///../../libs/bp-front/shared/api/getPushContent.ts:27:115)
    at async Promise.all (index 2)
    at async getServerSideProps (webpack-internal:///./src/pages/my-project/my-dashboard/index.tsx:88:93) {
  code: 'REQUEST_ERROR',
  sdk: 'AEMHeadless',
  sdkDetails: {
    serviceURL: 'https://publish-<specific-url>.adobeaemcloud.com/',
    endpoint: 'content/cq:graphql/my-project/endpoint.json'
  }
}

Reproduce Scenario (including but not limited to)

Query publish instance

Steps to Reproduce

Logs taken while reproducing problem

easingthemes commented 1 year ago
General Request error: Request failed with status code 404 Not Found

Check Network, endpoint is missing. It can be CORS or publishing issue.