AdguardTeam / AdguardTeam/AdGuardHome

Improve HTTP responses when the server is panicking

Đang mở
#3,740 0 bình luận 1 reaction 1 người được giao Được @EugeneOne1 nhận Xem trên GitHub
enhancement P3: Medium
Ngôn ngữ chính
TypeScript
Star
36.9k
Fork
2.5k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Currently, there are cases where AdGuard Home's internals encounter a runtime panic, which results in the frontend receiving no responses. AGH doesn't crash itself, since the default HTTP server has its own panic handling, but that's still rather poor UX.

What we need is a simple HTTP middleware that:

1. Recovers the panic.

2. Writes a `500` response with an appropriate content type (typically, a JSON object) that contains the panic's message.

3. Writes a backtrace, preferably on the `error` level as opposed to the current `debug`.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

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.