I have an Angular project integrated with odooRPC API. In the JSON response I get from odooRPC is below:
error:{message: "Odoo Session Expired", code: 100, data: {,…}}
code:100
data:{,…}
arguments:["Session expired"]
debug : "Traceback (most recent call last):↵ raise http.SessionExpiredException("Session expired")↵SessionExpiredException: Session expired↵"
exception_type:"internal_error"
message :"Session expired"
name : "odoo.http.SessionExpiredException"
message : "Odoo Session Expired"
id :null
jsonrpc :"2.0"
this is the response from the OddoRPC call function on the network tab in chrome when an exception or error occurs, but my problem is that I cannot get all this answer when I catch this error. All I get is an error inside the debug parameter. Is there a way to get the value of "code" or "message"
Any help would be appreciated.
The code I use to call the odoodRPC function inside angular:
return this.odooRPC.call('connect', 'getList',[],{}).catch((e: any) => {
console.log(e);
});
here getList is the function that I call from the Odoo server, and when I console it inside the catch block, all I get is the error message from the "debug" parameter.