AdguardTeam / AdguardTeam/AdGuardHome

Improve HTTP responses when the server is panicking

オープン
#3,740 コメント 0 件 リアクション 1 件 担当者 1 名 @EugeneOne1 が担当を希望しています GitHub で見る
enhancement P3: Medium
主要言語
TypeScript
スター
36.9k
フォーク
2.5k
PR マージ指標
30日以内にマージされた PR はありません

説明

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`.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。