fix(loader-website): an empty error message is shown when /manifest fails

Đang mở Phù hợp với người mới
#140 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
bun, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu tại apps/website/src/manifest.ts, ở fetch tới /manifest, rồi so sánh cách xử lý lỗi với apps/website/src/cache/cache.ts và cấu trúc phản hồi trong apps/client/src/server.ts. Đọc lỗi và chi tiết từ một phản hồi thất bại, cùng với giá trị dự phòng cho trạng thái HTTP được đề xuất. Hoàn thành khi một yêu cầu manifest thất bại hiển thị thông báo hữu ích trong bảng lỗi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

app:website bug good first issue
Which app is this bug report for?

website

Issue description

When /manifest returns a non-2xx status, the website throws new Error() with no message (manifest.ts#L7-L9). setError then shows an empty error panel, and the JSON body the client sends with its 500 ({ error, details }, client server.ts#L97-L103) is ignored.

Expected: the error panel shows why the manifest failed.

Suggested fix: read error/details from the body, as cache.ts#L94-L107 already does for game files, with HTTP Error <status> as a fallback.

Found during a read-only audit of main @ 044c766 (2026-11-11).

Code sample
const res = await fetch(`/manifest`);
if (!res.ok) {
  throw new Error(); // empty message shown to the user
}
Versions
  • @nanoforge-dev/loader-client / @nanoforge-dev/loader-server / @nanoforge-dev/loader-website 1.7.0 (main @ 044c766)
  • Bun 1.3.14
  • Linux x86_64
Issue priority

Low (slightly annoying)

I have tested this issue on a development release

044c766

Ngôn ngữ chính
TypeScript
Star
1
Fork
0
Merge trung bình
17 giờ 25 phút
Pull request đã merge (30 ngày)
11

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NanoForge-dev/Loader

Tất cả issue của NanoForge-dev/Loader

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.