ResourceNotFound from the binary protocol prints an empty key
メンテナーはふだん 1 日以内に返信
@xalestar がすでに取り組んでいます。
2026年11月5日 から。
評価
この issue はまだ評価されていません。
説明
Bug description
Deleting a personal access token that does not exist, over the binary protocol, fails with code 20 as expected, but the error message has an empty key:
Resource with key: was not found.
The caller cannot tell from the message what was not found. I expected the message to name the resource, or at least not to print an empty placeholder.
By reading the code, not confirmed for every path: the binary response carries only the status code, and the client rebuilds the error with IggyError::from_code (core/common/src/error/iggy_error.rs:703), which calls from_repr. That fills the String field of ResourceNotFound(String) with an empty string, and the #[error("Resource with key: {0} was not found.")] format then prints nothing for {0}. The server maps DeletePersonalAccessTokenResult::NotFound to code 20 (core/metadata/src/stm/result.rs:766), and the user-not-found results use the same code, so I expect those to show the same message. Other variants with fields that are decoded from a bare code may have the same problem.
Affected area / component
Rust SDK, Python SDK, Wire protocol / API
Deployment
Local build, cargo run --bin iggy-server -- --with-default-root-credentials
Versions
Server: master at 06cf04e5e. Python SDK: branch of #4766, which adds delete_personal_access_token to the Python client.
Hardware / environment
macOS, Apple Silicon (arm64)
Sample code
import asyncio
from apache_iggy import IggyClient
async def main():
client = IggyClient("127.0.0.1:8090")
await client.connect()
await client.login_user("iggy", "iggy")
try:
await client.delete_personal_access_token("no-such-token-xyz")
except Exception as error:
print(type(error).__name__, error.code, error)
asyncio.run(main())
Output:
IggyError 20 Resource with key: was not found.
Reproduction
- Start a local server with
cargo run --bin iggy-server -- --with-default-root-credentials. - Build the Python SDK from #4766 with
maturin developinforeign/python. The Rust client'sdelete_personal_access_tokengoes through the samefrom_codepath. - Run the sample above.
- 主要言語
- Rust
- スター
- 5.2k
- フォーク
- 516
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 155
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/iggy のほかの issue
-
Go examples: add a message envelope producer and consumer対応中かも @ThunderGod77 が 6 日前に担当しました。 オープンgo good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/iggy#4694 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
HTTP client treats a consumer group as a plain consumer対応中かも @mohitduhan19 が 24 日前に担当しました。 オープンbug rust server
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Add the fail-fast connection option to the Rust and Python quick-starts対応中かも @QIW9 が 11 日前に担当しました。 オープンdocs good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
Go SDK: validate personal access token name length before serialization対応中かも @p4rtridge が 4 日前に担当しました。 オープンbug go good first issue
メンテナーはふだん 1 日以内に返信
-
CI/CD connectors
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
cloudflare/workers-rs#1130 ·
メンテナーはふだん 11 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
vfarcic/dot-agent-deck#2160 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
RustCrypto/utils#1597 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信