ZCServerException Caused by : UnAuthorized

ZCServerException Caused by : UnAuthorized

I am following up the catalyst tutorial of creating a todo application - todo app. I am using java for the server and react for frontend. Having followed all instructions as instructed, I have built the app. While testing the application with catalyst serve, I get this exception :

[SEVERE] : Jun 05, 2024 10:14:11 AM ToDoList runner
SEVERE: Exception in Main
com.zc.exception.ZCServerException. Caused by : UnAuthorized
        at com.zc.api.APIResponse.setHttpStatusCode(APIResponse.java:47)
        at com.zc.api.APIResponse.<init>(APIResponse.java:30)
        at com.zc.api.APIRequest.getResponse(APIRequest.java:394)
        at com.zc.component.zcql.ZCQLService.executeZCQLQuery(ZCQLService.java:71)
        at com.zc.component.zcql.ZCQL.executeQuery(ZCQL.java:39)
        at ToDoList.runner(ToDoList.java:46)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.cop.main.server.AdvancedIOFlavour.invokeMethod(AdvancedIOFlavour.java:30)
        at com.cop.main.server.FunctionFlavourHandler.executeFunction(FunctionFlavourHandler.java:96) 
        at com.cop.main.server.ServletHandler.handleFunction(ServletHandler.java:215)
        at com.cop.main.server.ServletHandler.doPost(ServletHandler.java:83)
        at com.cop.main.server.ServletHandler.doGet(ServletHandler.java:134)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848)
        at org.eclipse.jetty.servlet.ServletHandl

>>>
I presume its something to do with authorization coz following the stack trace to my java class line 46, here is the code. 
  1. Integer totalTodos = Integer  
                                    .parseInt(ZCQL.getInstance().executeQuery("SELECT COUNT(ROWID) FROM TodoItems").get(0)
                                    .get("TodoItems", "ROWID").toString());
           

What could be the issue? Help me out. 

      Catalyst Community