neo-project / neo-modules

MIT License
60 stars 100 forks source link

RPC Server DebugMode #840

Closed cschuchardt88 closed 4 months ago

cschuchardt88 commented 10 months ago

Summary or problem description Hi guys, working on neo-express. Ran into a problem where I am trying to get an error from RPC server. We use a custom express plugin to do this. However we are still using the core of RPC Server with add-ons of custom methods.

the problem is: https://github.com/neo-project/neo-modules/blob/2d7fb2778ca7ad11815e438534916103859e36ac/src/RpcServer/RpcServer.cs#L253-L268

What the problem is, we are getting error Neo.Network.RPC.RpcException: Invalid params and I want to get the real error. Sure there is workarounds for this and I know this would make NeoGo node inconsistent with C# node.

Do you have any solution you want to propose? That we have a setting in the config.json file to bypass this to show the full error.

{
  "DebugMode": "true"
}

Where in the software does this update applies to?

Jim8y commented 10 months ago

make sense

roman-khimov commented 10 months ago

I'd just implement #814 and that's it. Try the same requests for NeoGo nodes (https://status.fs.neo.org/ has some public ones), it returns much more data even for common "invalid params" codes (data field exists exactly for that). Nothing prevents C# node from doing the same.

cschuchardt88 commented 10 months ago

Yes but

We use a custom express plugin to do this. However we are still using the core of RPC Server with add-ons of custom methods.

That's the reason why we need this feature. This is for neo-express to get and display the correct error. There is no way currently to do this.

cschuchardt88 commented 4 months ago

added in #865