fix(federation): InboxにきたCreate, AnnounceのobjectがBearcaps urlだった際はスキップするように
Resolve #13608
Based on https://github.com/misskey-dev/misskey/pull/13553
Diff: https://github.com/misskey-dev/misskey/compare/lem-ann...skip-bear
What
InboxにきたCreate, AnnounceのobjectがBearcaps urlだった際はスキップするように
Why
Resolve #13608
Additional info (optional)
Checklist
- [ ] Read the contribution guide
- [ ] Test working in a local environment
- [ ] (If needed) Add story of storybook
- [ ] (If needed) Update CHANGELOG.md
- [ ] (If possible) Add tests
Codecov Report
Attention: Patch coverage is 3.57143% with 81 lines in your changes are missing coverage. Please review.
Project coverage is 65.07%. Comparing base (
f8261a1) to head (dc564fc). Report is 593 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #13610 +/- ##
============================================
- Coverage 79.95% 65.07% -14.88%
============================================
Files 956 989 +33
Lines 108864 112508 +3644
Branches 8413 5808 -2605
============================================
- Hits 87045 73220 -13825
- Misses 21819 37847 +16028
- Partials 0 1441 +1441
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
エラーをstringで返すのは不自然な気がする
エラーをstringで返すのは不自然な気がする
まず、エラー (というか恒久的エラー) は、throw Error か unrecoverable error でBullにハンドルさせているのでここでは関係なし。 ここでstring返しているのは、成功 または エラーのうち一時的エラー の内容のみ。 なので、まあstringでも不自然ではないとは思うのだわ。
あと、Bearcaps決め打ちで落とだけだと不十分で、複雑な気がするのだわ。
それも考えたけど、stringにしたのは変更量を小さくするため
IdentificalError(だっけ?)で最後にハンドリングしてるのと整合性取れない感じではある
UnrecoverableErrorクラス(Bullのやつ?Inbox独自のやつ?)を使ってハンドルするとかがよさそう?
とりあえずnode-fetch前にprocotolチェックして4xxにすれば、少なくともスキップしてくれるかもだわ。 https://github.com/misskey-dev/misskey/compare/develop...mei23:misskey:mei-v13-send-protocol
スキップするのをstringにするかどうかは #13553 マター
@syuilo これはマージしたい
🙏