Misleading message: "Key is not included in URL"
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Tìm kiếm trong codebase thông báo chính xác "Key is not included in URL" và lần theo đường dẫn xác thực được thực thi bởi payload mẫu. Tái hiện trường hợp id số nguyên không hợp lệ, sau đó cập nhật cách diễn đạt để mô tả một id không hợp lệ hoặc không khớp và xác minh hành vi request liên quan bằng các test hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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."
- Ngôn ngữ chính
- Ruby
- Star
- 2.3k
- Fork
- 546
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của JSONAPI-Resources/jsonapi-resources
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
ArgumentError with Rails 8.1 Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 50/100
JSONAPI-Resources/jsonapi-resources#1488 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
JSONAPI-Resources/jsonapi-resources#1479 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
JSONAPI-Resources/jsonapi-resources#1477 · 3 bình luận · 1 reaction ·
-
Fields filtering with include Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
Tất cả issue của JSONAPI-Resources/jsonapi-resources
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
バグ
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Version bump for OpenVox 9 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
voxpupuli/puppet-epel#186 · 1 bình luận ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) Đang mởBug Frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100