Hello All, Many thanks for taking the time to read this.
Here are 2 of my services, the advanced one isn’t working and returning cannot read properties of null (Role). Is there anything i am missing? The simple one to return role is working fine.
It appears that the issue stems from attempting to call the function as a non-logged-in user, which results in the Get current user block returning null. I have added a user to your app and called the method as a logged-in user. Now, the error message I received is:
{"code":0,"message":"Cannot read properties of null (reading 'date')","errorData":{}}%
This error suggests that the request body might be empty, which seems to be expected in this case.
To address this, could you please add a null check in your business logic? This would help prevent the function from trying to access properties of a null object, thereby avoiding these types of errors. Let me know if you need any assistance implementing this check or if there’s anything else I can help with!