[WIP] Refactor RPC error codes to rpc module