Support plain text errors
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
progenitor-client/src/progenitor_client.rs から始め、特に from_response とその fmt::Debug バウンドを確認してから、issue の YAML 例から生成を再現します。生成されたクライアントが text/plain の文字列エラーレスポンスに対してコンパイルでき、そのレスポンスをサポートされていない ByteStream バウンドを要求せずに処理できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hi,
I have a spec where the error message is of string type and the mime type is plaintext:
/some/path:
post:
responses:
'200': ...
'500':
description: Server error
content:
text/plain; charset=utf-8:
schema:
type: string
This gets generated into a method returning Result<ResponseValue<_>, Error<ByteStream>>. The problem happens when deserialize the response:
match response.status().as_u16() {
200u16 => ResponseValue::from_response(response).await,
500u16 => Err(Error::ErrorResponse(ResponseValue::stream(response))),
_ => Err(Error::UnexpectedResponse(response)),
}
The from_response method has a bound to fmt::Debug on the error type, which is not implemented for ByteStream, thus failing compilation.
I worked around it by simply removing the bound, but I'm wondering if there's a better solution. I can also open a PR to fix it if this workaround is good.
- 主要言語
- Rust
- スター
- 1k
- フォーク
- 142
- 平均マージ
- 19時間 13分
- マージ済み PR(30日)
- 16
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
oxidecomputer/progenitor のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
oxidecomputer/progenitor#1345 ·
メンテナーはふだん 1 日以内に返信
-
Generated client treats a declared 304 Not Modified as UnexpectedResponse対応中かも @jjant が 6 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
oxidecomputer/progenitor#1462 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
oxidecomputer/progenitor#1457 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
oxidecomputer/progenitor#1444 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
oxidecomputer/progenitor#1382 ·
メンテナーはふだん 1 日以内に返信
oxidecomputer/progenitor の issue をすべて見る
似ている issue
-
area: cli good first issue type: feature
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
[Bug] Windows Ghidra provider rejects a PATH-only JDK: bare `java.exe` probe fails with Win32 87オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
renaming a provider to a taken name fails with a raw sql error対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンarea:storage kind:bug priority:p3 ready
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug bugfix
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
storytold/photocraft#16975 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信