Acessing endpoints of deployed nodejs app is causing Errors

I have deployed a backender server (nodejs app). The deployment was successful. I can access endpoints where there is no need of middleware which does authentication via CLERK.

Some API use middleware, which does authentication using CLERK. Whenever I try to access those endpoints where the middleware performs authentication, I am getting “Error : unauthenticated.”

FYI: There is a frontend app that is continuously trying to access these end points.
I check the network response of such requests. It says “Internal server error”
example: endpoint: https://chatgpt-server-5j3f.onrender.com/api/chats.

Further to the above points, Just to clarify before deploying the nodejs app, all the endpoints are working well.

Can you guide us to solve the issue.

These are some of the logs.
Error: Unauthenticated
at file:///opt/render/project/src/backend/node_modules/@clerk/clerk-sdk-node/dist/index.mjs:139:12
Error: Unauthenticated
at file:///opt/render/project/src/backend/node_modules/@clerk/clerk-sdk-node/dist/index.mjs:139:12
Error: Unauthenticated
at file:///opt/render/project/src/backend/node_modules/@clerk/clerk-sdk-node/dist/index.mjs:139:12

Hi,

I’ve replied to the ticket you also opened. This would be a code issue. You will need to ensure that you’re authenticating the requests as required by whichever mechanism you have implemented. This wouldn’t be a Render issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.