Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Return gRPC status code from grpc_query_*.go in x/did and x/token #192

Merged
merged 1 commit into from
Jul 16, 2021

Conversation

youngjoon-lee
Copy link
Contributor

@youngjoon-lee youngjoon-lee commented Jul 16, 2021

                                           ┌──────────────┐
                                           │ HTTP caller  │
                                           └──────────────┘
                                                  ▲
                                                  │
                                                  │
┌─────────────────────────────────────────────────┼──────────────────┐
│                                                 │                  │
│ Cosmos SDK                                      │                  │
│                                                 │                  │
│                                                 │HTTP status code  │
│                                       ┌─────────┴─────────┐        │
│                                       │  gRPC Gateway     │        │
│                                       └───────────────────┘        │
│                                                 ▲                  │
│                                                 │ gRPC error code  │
│                                                 │                  │
│     ┌──────────────────┐              ┌─────────┴─────────┐        │
│     │ msg_server_*.go  │              │  grpc_query_*.go  │        │
│     └────────┬─────────┘              └─────────┬─────────┘        │
│              │                                  │                  │
│              │ ABCI error code                  │ gRPC error code  │
│              ▼                                  ▼                  │
│     ┌──────────────────┐              ┌───────────────────┐        │
│     │ ABCI DeliverTx() │              │ ABCI Query()      │        │
│     └────────┬─────────┘              └───┬───────────────┘        │
│              │                            │ (gRPC-err to ABCI-err internally)
│              │                            │                        │
│              │                            │                        │
│              │ResponseDeliverTx{}         │ ResponseQuery{}        │
│              │                            │                        │
├──────────────┼────────────────────────────┼────────────────────────┤
├──────────────┼────────────────────────────┼────────────────────────┤
│  Tendermint  │                            │                        │
│              ▼                            ▼                        │
│             ┌──────────────────────────────────────┐               │         ┌───────────┐
│             │             ABCI caller              ├───────────────┼────────►│ RPC caller│
│             │                                      │               │         └───────────┘
│             └──────────────────────────────────────┘               │        (Users or other nodes)
│                                                                    │
│                                                                    │
│                                                                    │
└────────────────────────────────────────────────────────────────────┘

@youngjoon-lee youngjoon-lee added this to the v2.0.1 milestone Jul 16, 2021
@youngjoon-lee youngjoon-lee requested review from cl9200 and gyuguen July 16, 2021 00:26
@youngjoon-lee youngjoon-lee self-assigned this Jul 16, 2021
Copy link
Contributor

@gyuguen gyuguen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
Oh, It been changed to grpc response code.

@youngjoon-lee youngjoon-lee merged commit 03df0b2 into master Jul 16, 2021
@youngjoon-lee youngjoon-lee deleted the fix/na/return-grpc-error branch July 16, 2021 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants