キューに予期しないデータが入っている場合、エンドポイントURLのパースもエラーログの作成も失敗する問題を修正 (MisskeyIO#168)

This commit is contained in:
まっちゃとーにゅ 2023-09-20 02:57:08 +09:00 committed by GitHub
parent e9124ca5f4
commit 760fe8cfcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -63,7 +63,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
try { try {
host = new URL(job.data.to).host; host = new URL(job.data.to).host;
} catch (e) { } catch (e) {
this.apiLoggerService.logger.warn(`failed to parse url '${job.data.to}': ${e}`); this.apiLoggerService.logger.warn(`failed to parse url in ${job.id}: ${e}`);
this.apiLoggerService.logger.warn(`id: ${job.id}, data: ${JSON.stringify(job.data)}`);
continue; continue;
} }

View file

@ -63,7 +63,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
try { try {
host = new URL(job.data.signature.keyId).host; host = new URL(job.data.signature.keyId).host;
} catch (e) { } catch (e) {
this.apiLoggerService.logger.warn(`failed to parse url '${job.data.signature.keyId}': ${e}`); this.apiLoggerService.logger.warn(`failed to parse url in ${job.id}: ${e}`);
this.apiLoggerService.logger.warn(`id: ${job.id}, data: ${JSON.stringify(job.data)}`);
continue; continue;
} }