fix: Inbox処理でLD-Signature検証中のエラーが不要にリトライされる問題を修正

verifyRsaSignature2017 が jsonld.ValidationError 等の非 JsonLdError を
投げた場合、UnrecoverableError に包まれずそのまま再スローされていたため、
Bull が無駄にリトライし error レベルでスタックトレースが出力されていた。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
fruitriin 2026-06-24 20:13:51 +09:00
commit e343edc71f
2 changed files with 4 additions and 5 deletions

View file

@ -7,7 +7,7 @@
-
### Server
-
- Fix: Inbox処理でLD-Signature検証中にJSON-LD以外のエラーが発生した場合、ジョブが不要にリトライされる問題を修正
## 2026.6.0

View file

@ -21,7 +21,7 @@ import { ApDbResolverService } from '@/core/activitypub/ApDbResolverService.js';
import { StatusError } from '@/misc/status-error.js';
import { UtilityService } from '@/core/UtilityService.js';
import { ApPersonService } from '@/core/activitypub/models/ApPersonService.js';
import { JsonLdError, JsonLdService } from '@/core/activitypub/JsonLdService.js';
import { JsonLdService } from '@/core/activitypub/JsonLdService.js';
import { ApInboxService } from '@/core/activitypub/ApInboxService.js';
import { bindThis } from '@/decorators.js';
import { IdentifiableError } from '@/misc/identifiable-error.js';
@ -193,11 +193,10 @@ export class InboxProcessorService implements OnApplicationShutdown {
throw new Bull.UnrecoverableError('skip: LD-Signatureの検証に失敗しました');
}
} catch (error) {
if (error instanceof JsonLdError) {
throw new Bull.UnrecoverableError(`skip: encountered a JSON-LD error while verifying signature: ${error}`);
} else {
if (error instanceof Bull.UnrecoverableError) {
throw error;
}
throw new Bull.UnrecoverableError(`skip: encountered an error while verifying LD-Signature: ${error}`);
}
// もう一度actorチェック