[FEATURE REQUEST] CLI could be more helpful about some kinds of API responses
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Bắt đầu với pkg/errors/deduce.go, đặc biệt là phần hướng dẫn hiện có cho các phản hồi 401 và 403. Xem lại các ví dụ được liên kết và xác định những đường dẫn API đã biết hoặc phản hồi 404 nào nên nhận được hướng dẫn tương tự. Được xem là hoàn thành khi CLI đưa ra hướng dẫn hữu ích, không làm lộ thông tin cho các trường hợp đã thống nhất, thay vì chỉ đề xuất báo cáo lỗi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
fastly CLI operations failed for me in ways that made no sense (404s configuring a service that has existed for years, etc), and it took me a moment to figure out it was because I had unwittingly used the wrong token.
Describe the solution you'd like
The CLI suggests "If you believe this error is the result of a bug, please file an issue", but for example cases like "404 on PUT /service/<service_id>" are probably not returning 404 as a bug but as a result of the service not existing or provided API token not being able to manage that service.
The CLI offers basically exactly the advice that would have helped me but only for 401 and 403 responses. for some known API paths (is there an OpenAPI document for the Fastly API? I don't remember) this would definitely have helped me too.
Describe alternatives you've considered
https://github.com/fastly/cli/issues/894 describes the API's somewhat minimal 404 "Cannot find ..." as there being a bug ticket to track a fix. I imagine that the experience of operating on a service you can't access wouldn't substantially change from the API PoV - you don't want to inadvertently disclose a service ID to be valid or the scope on a token, after all - but maybe there's something there.
or maybe no change to the CLI after all 🤷♀️
Additional context
in addition to my own, this probably would have helped (or at least been the same advice Fastly offers, without the round trip) in many of the following cases:
https://github.com/fastly/cli/issues/1780
https://github.com/fastly/cli/issues/1237 <-- don't know for sure since there was no followup from OP, but this was the advice to the issue-filer
https://github.com/fastly/cli/issues/1256 <-- from the same author, this was the issue
https://github.com/fastly/cli/issues/894
https://github.com/fastly/cli/issues/793 <-- educated guess given 404 on a fresh fastly profile create...
- Ngôn ngữ chính
- Go
- Star
- 164
- Fork
- 80
- Merge trung bình
- 1 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 25
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 fastly/cli
-
bug feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
fastly/cli#1709 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
feature request
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
-
feature request
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
fastly/cli#1790 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature request
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
fastly/cli#1734 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
effort:high model:sonnet phase:3 type:docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
OffchainLabs/nitro#4771 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
BurntSushi/toml#530 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 7 ngày