Misleading message: "Key is not included in URL"
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 45/100
調査の方向性
コードベースで正確なメッセージ "Key is not included in URL" を検索し、example payload によって実行される検証パスを追跡します。無効な整数 id のケースを再現し、その後、無効な id または一致しない id を説明するように文言を更新し、既存のテストで関連するリクエストの動作を確認します。
索引モデルが issue の本文から書いたものです。
説明
Great gem, but the error message "Key is not included in URL" seems misleading to me for some reasons.
I) It is not clear whar is meant by "key" (I would suggest "id").
II) The message references a concrete problem in the URL, a missing key, which might not be true (e.g. a wrong key might be the problem as well).
III) The error could have happened in the data section as well.
IV) This message is returned whenever something goes wrong with the id (e.g. wrong type of id field in the data section), see example
Example: The following patch request to the correct url (and id) might cause this error message due to an invalid data type (int) for id. It has nothing to do with a "not included" key in the url.
{
data: {
"type": "articles",
"id": 1,
"attributes": {
"title": "updated title"
}
}
}
The request is invalid because of the wrong type (int) for "id". It MUST be string (conforming to json api), and jsonapi-resources correctly refuses to process this request, but with this misleading error message.
Suggestion for this Message: "id field is invalid or does not match the id given in the URL."
- 主要言語
- Ruby
- スター
- 2.3k
- フォーク
- 546
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JSONAPI-Resources/jsonapi-resources のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 50/100
JSONAPI-Resources/jsonapi-resources#1488 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
JSONAPI-Resources/jsonapi-resources#1479 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
JSONAPI-Resources/jsonapi-resources#1477 · コメント 3 件 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
JSONAPI-Resources/jsonapi-resources の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
バグ
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
voxpupuli/puppet-epel#186 · コメント 1 件 ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) オープンBug Frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100