How to set Up Catalyst and Connecting to ZCQL in Appsail with Node.js 18 SDK

How to set Up Catalyst and Connecting to ZCQL in Appsail with Node.js 18 SDK

I recently extended my Catalyst project's functionality to Appsail, excluding Catalyst functions. While integrating the zcatalyst-sdk-node package for CRUD operations, I encountered an unexpected 'Failed to parse object' error during initialization (catalyst.initialize(req)). Prior to this, I had successfully configured Appsail, testing basic routes that displayed 'Hello world' both locally and on the cloud.
here is the issue when i initialize req
Seeking assistance from the community, I'm curious if others have faced a similar issue or if there are known solutions for this scenario. Any insights, troubleshooting tips, or alternative approaches would be greatly appreciated. My goal is to seamlessly integrate Appsail with zcatalyst-sdk-node for CRUD operations, and I'm looking forward to sharing the solution with others who might be encountering the same challenge.

the exact error is:  CatalystAppError: Failed to parse object

Server Started at http://localhost:9000
{}
Error fetching users: CatalystAppError: Failed to parse object
    at CatalystNamespace.loadOptionsFromObj (/home/narayanan-002/Desktop/practice codes/catalyst practice/appsail/node_modules/zcatalyst-sdk-node/lib/catalyst-namespace.js:123:19)
    at CatalystNamespace.initialize (/home/narayanan-002/Desktop/practice codes/catalyst practice/appsail/node_modules/zcatalyst-sdk-node/lib/catalyst-namespace.js:88:35)
    at CatalystNamespace.initialize (/home/narayanan-002/Desktop/practice codes/catalyst practice/appsail/node_modules/zcatalyst-sdk-node/lib/catalyst-namespace.js:100:33)
    at /home/narayanan-002/Desktop/practice codes/catalyst practice/appsail/index.js:17:36
    at Layer.handle [as handle_request] (/home/narayanan-002/Desktop/practice codes/catalyst practice/appsail/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/narayanan-002/Desktop/practice codes/catalyst practice/appsail/node_modules/express/lib/router/route.js:144:13)
    at Route.dispatch (/home/narayanan-002/Desktop/practice codes/catalyst practice/appsail/node_modules/express/lib/router/route.js:114:3)
    at Layer.handle [as handle_request] (/home/narayanan-002/Desktop/practice codes/catalyst practice/appsail/node_modules/express/lib/router/layer.js:95:5)
    at /home/narayanan-002/Desktop/practice codes/catalyst practice/appsail/node_modules/express/lib/router/index.js:284:15
    at Function.process_params (/home/narayanan-002/Desktop/practice codes/catalyst practice/appsail/node_modules/express/lib/router/index.js:346:12) {
  errorInfo: {
    code: 'app/invalid_project_details',
    message: 'Failed to parse object',
    value: {
      host: 'localhost:9000',
      connection: 'keep-alive',
      'cache-control': 'max-age=0',
      'sec-ch-ua': '"Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"',
      'sec-ch-ua-mobile': '?0',
      'sec-ch-ua-platform': '"Linux"',
      'upgrade-insecure-requests': '1',
      'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
      accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
      'sec-fetch-site': 'none',
      'sec-fetch-mode': 'navigate',
      'sec-fetch-user': '?1',
      'sec-fetch-dest': 'document',
      'accept-encoding': 'gzip, deflate, br',
      'accept-language': 'en-IN,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,ta;q=0.6,de;q=0.5,ar;q=0.4'
    }
  },
  codePrefix: 'app'
}

please help me to fix this issue.

      Catalyst Community