neo-go icon indicating copy to clipboard operation
neo-go copied to clipboard

rpc: take care of response errors and error codes

Open AnnaShaleva opened this issue 4 years ago • 2 comments

  • We should carefully distinguish all kinds of RPC errors (parameters parsing errors / handling errors / server errors / etc.) on the server side. Each meaningful error should have a separate meaningful error code.
  • All possible errors for each RPC call should be documented.
  • All possible errors should be presented as exported variables and have proper comments for external users.
  • RPC client should be able to distinguish errors by codes and should return these specific errors. Users should be able to identify them via errors.Is(...)
  • All errors and error codes should be compatible with the reference implementation, so we may add an issue about errors naming to neo-modules repo.

AnnaShaleva avatar Nov 09 '21 13:11 AnnaShaleva

#2544 fixes №3 and №4, but we still need to synchronize with C#, extend the set of errors and then extend the documentation.

roman-khimov avatar Jun 10 '22 15:06 roman-khimov

№1, №2 and №5 are dependent on the https://github.com/neo-project/neo-modules/issues/728.

AnnaShaleva avatar Jun 10 '22 16:06 AnnaShaleva