[Bug] Handle Gemini error responses safely in /quick ai
@CodeMatrix1 đang làm issue này rồi.
Từ ngày 30/3/2026.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Bắt đầu từ điểm vào /quick ai và theo dõi việc xử lý phản hồi Gemini xung quanh response.data.candidates[0].content.parts[0].text. Tái hiện một phản hồi do quá tải hoặc tạm thời không khả dụng, sau đó xác minh rằng các thông báo rõ ràng từ nhà cung cấp được hiển thị và các phản hồi không mong đợi được ghi log thay vì gây ra lỗi chung.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened?
Description
When /quick ai is used with Gemini and the provider returns an error payload instead of generated candidate text, the AI flow fails.
The current implementation assumes the Gemini response always contains text at:
response.data.candidates[0].content.parts[0].text
In practice, Gemini can return an error object instead of candidates, for example when the model is overloaded or temporarily unavailable. In those cases, /quick ai does not handle the response shape safely.
Expected behavior
/quick aishould safely handle Gemini responses that do not includecandidates- if Gemini returns an explicit error payload, the app should surface the provider message instead of failing
- if Gemini returns an unexpected shape without generated text, the app should log the error in gemini response.
Actual behaviour
/quick aiassumes the Gemini response always contains generated text atresponse.data.candidates[0].content.parts[0].text- when Gemini returns an error payload instead of
candidates, the AI flow fails - proper logs are not generated
- the modal falls back to a generic failure message instead of handling the provider response safely
Steps to reproduce
- Install the Quick Replies app
- Configure Gemini as the AI provider
- Trigger
/quick ai - Enter a prompt and click
Generate - Hit a Gemini error response such as overload / temporary unavailability
- Observe that the response does not contain generated candidate text
Relevant ScreenShots
Version
v8.2.1
What browsers are you seeing the problem on?
Firefox
- Ngôn ngữ chính
- TypeScript
- Star
- 7
- Fork
- 21
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không 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 RocketChat/Apps.QuickReplies
-
[Bug]: Contextual bar actions do not work and duplicate reply names are allowed during editsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
RocketChat/Apps.QuickReplies#70 · 1 bình luận ·
-
[Bug]: /quick ai error messages are not role-aware and lack actionable guidanceCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
[Feat] One Click AI-Powered Reply Suggestions for Improved UXCó thể làm lại được @moyrsd đã nhận 583 ngày trước và không có pull request nào đang mở. Đang mởenhancement
RocketChat/Apps.QuickReplies#59 · 3 bình luận · 1 người được giao ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
RocketChat/Apps.QuickReplies#55 · 2 bình luận ·
Tất cả issue của RocketChat/Apps.QuickReplies
Issue tương tự
-
Bug: Broken RTL / BiDi text rendering when mixing Persian (Farsi) with English or numbersCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 68/100
amosblomqvist/learnharness#758 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Change WorkspacesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
bitfocus/companion-module-renewedvision-propresenter-api#134 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
rcpch/digital-growth-charts-react-component-library#304 ·
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 72/100
dsh-market/dsh-market#1210 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
trustjonathan/STUDY-HUB#13 ·