bug: an object-store 404 with an empty reason phrase makes a missing transcript a 502 instead of a 404
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
Bắt đầu tại apps/webapp/app/v3/objectStoreClient.server.ts:135-141, nơi getObjectResponse ném lỗi chỉ dùng response.statusText, và tại isTranscriptNotFound trong apps/webjapp/app/services/realtime/transcriptDownload.server.ts:46-54, hàm này khớp thông điệp với một regex cố định "Not Found". Truyền response.status lên lỗi được ném và để isTranscriptNotFound kiểm tra status trước. Thêm test hồi quy trong transcriptDownload.server.test.ts dùng một máy chủ TCP cục bộ trả lời HTTP/1.1 404 \r\nContent-Length: 0\r\n\r\n; hoàn tất khi test đó pass và suite transcript, oxfmt, oxlint cùng typecheck của webapp vẫn xanh. Lưu ý: PR liên kết #4987 tồn tại (đã đóng, chưa merge) và tác giả cho biết một bản sửa đã sẵn sàng cục bộ, vì vậy hãy xác nhận issue chưa được nhận trước khi bắt đầu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Provide environment information
Not environment-specific: found in the webapp source at main @ c2b7a72180 and reproduced with the webapp's own Vitest suite (macOS arm64, pnpm).
Describe the bug
A missing transcript can return 502 instead of 404 when the object store's 404 response has an empty reason phrase.
-
Aws4FetchClient.getObjectResponse(apps/webapp/app/v3/objectStoreClient.server.ts:135-141) throws an error built only fromresponse.statusTextand discardsresponse.status:throw new Error(`Failed to download from object store: ${response.statusText}`); -
isTranscriptNotFound(apps/webapp/app/services/realtime/transcriptDownload.server.ts:46-54) recognizes this adapter's missing object only by matching the message against/^Failed to download(?: range)? from object store: Not Found$/.
A valid HTTP/1.1 404 with no reason phrase gives the message Failed to download from object store: . It isn't classified as not found, so the route answers with a download failure (502).
Expected: a 404 from the object store is recognized by its status code, whatever the reason phrase says.
Reproduction repo
N/A (test against this repo, below)
To reproduce
In transcriptDownload.server.test.ts, start a local TCP server that replies HTTP/1.1 404 \r\nContent-Length: 0\r\n\r\n. Point ObjectStoreClient.create({ baseUrl: "http://127.0.0.1:<port>", service: "s3", ... }) at it, then:
await expect(client.getObjectResponse(key)).rejects.toSatisfy(isTranscriptNotFound);
On main this fails, because the error message is Failed to download from object store: and it isn't recognized.
Additional information
A fix with this regression test and a .server-changes note is ready locally:
- the thrown error carries
status: 404; isTranscriptNotFoundchecks the status first.
The transcript suite (8 passed), oxfmt, oxlint and webapp typecheck pass. I'll open it as a draft PR with fixes #<this> once the account is vouched.
Prepared with AI assistance (Claude) from the breken-ai account.
- Ngôn ngữ chính
- TypeScript
- Star
- 16.5k
- Fork
- 1.5k
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 17
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 triggerdotdev/trigger.dev
-
bug: retry.fetch ignores the caller's abort signal and retries aborted requestsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
triggerdotdev/trigger.dev#5116 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: Chat transport crashes on Safari < 17.4: AbortSignal.any is not a functionCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
triggerdotdev/trigger.dev#5098 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: Side menu items lose their active state on detail pagesCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
triggerdotdev/trigger.dev#5088 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: RBAC loader logs "plugin found but failed to load" when @triggerdotdev/plugins is simply not installedCó thể làm lại được @itsfaryal đã nhận 17 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
triggerdotdev/trigger.dev#5083 · 1 bình luận ·
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 83/100
triggerdotdev/trigger.dev#5072 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của triggerdotdev/trigger.dev
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug platform-android
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Termix-SSH/Mobile#146 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
devswha/herdr-web-ui#3875 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
area: runtime chore cli consistency dependencies developer-experience difficulty: easy discovery documentation enhancement good first issue help wanted hygiene json-output packaging priority: P3 tests version
Độ 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 1 ngày