catalystbyzohozohocatalystcatalystcloudscale

Getting "unable to find the type of initialisation. kindly specify one"


I am trying to retrieve the current user details in my Catalyst Node function using the method when getCurrentUser(). But when executing the function, I am getting the error

unable to find the type of initialisation. kindly specify one

I tried re-running the function by reloading the function URL still getting the same error.


Solution

  • You might have faced this issue if you have not passed the req object when you initialized the Catalyst SDK since the SDK was unable to initialize properly

    let catalystapp = catalyst.initialize();
    

    To resolve this issue, you can pass the (req) object to the initialize() method. For example:

    let catalystapp = catalyst.initialize(req);
    

    You can find the official help documentation for initializing the Catalyst Node SDK here.