Repository navigation
fix(widgets): Nd:http の通信断 (status 0) を「通信できません」として描く (notedeck#1294) - #97
Merged
Merged
Conversation
NoteDeck は Nd:http の通信断 (DNS 失敗・接続拒否・タイムアウト) を throw では
なく `{ status: 0, error }` の値で返すようになった (notedeck#1294)。従来は
AiScript に try/catch が無いため捕捉できず、ウィジェットが「読み込み中…」の
まま固まっていた。
Nd:http を使う 22 ウィジェットと url-safety-check プラグインで、status 0 を
「HTTP 0」ではなく「通信できません」(接続できません) として描く。status を
見ずに Json:parse していた listenbrainz / weather と、理由を出していなかった
earthquake / joinmisskey-stats は、非 200 を先に分岐して理由を出すようにした。
docs/registry-format.md の NoteDeck 差分に値の形を追記。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
なぜ
NoteDeck は
Nd:httpの通信断 (DNS 失敗・接続拒否・タイムアウト・応答の読み取り失敗) を throw ではなく{ status: 0, headers: {}, body: "", error }の値で返すようになった (notedeck#1294)。AiScript には try/catch が無いので、従来はウィジェット側で捕捉できず「読み込み中…」のまま固まっていた。何を
Nd:httpを使う 22 ウィジェット +url-safety-checkプラグインで、status == 0を「HTTP 0」ではなく「通信できません」(nodeinfo / osv / soundcloud は「〜に接続できません」) として描く。既存のstatus != 200分岐に乗せただけで、取得ロジックは変えていないstatusを見ずにJson:parseしていた listenbrainz / weather は非 200 を先に分岐し、理由つきのエラー行を出すlastStatusを持って理由 (通信できません / HTTP n) を添えるdocs/registry-format.mdの「NoteDeck と本家の差分」に値の形を追記registry:buildで api.json / 一覧 JSON を再生成検証
pnpm registry:build/pnpm contract:verify(157 件合格) /check-registry-integrityOK🤖 Generated with Claude Code