fix two instances of logging full exceptions

This commit is contained in:
Hazelnoot 2025-06-26 12:19:14 -04:00
parent c190dfa6bc
commit a1bd0a3580
2 changed files with 2 additions and 4 deletions

View file

@ -494,7 +494,7 @@ export class ApPersonService implements OnModuleInit, OnApplicationShutdown {
user = u as MiRemoteUser;
publicKey = await this.userPublickeysRepository.findOneBy({ userId: user.id });
} else {
this.logger.error(`Error creating Person: ${renderInlineError(e)}`);
this.logger.error(`Error creating Person ${uri}: ${renderInlineError(e)}`);
throw e;
}
}

View file

@ -68,9 +68,7 @@ export class ImportCustomEmojisProcessorService {
fs.writeFileSync(destPath, '', 'binary');
await this.downloadService.downloadUrl(file.url, destPath, { operationTimeout: this.config.import?.downloadTimeout, maxSize: this.config.import?.maxFileSize });
} catch (e) { // TODO: 何度か再試行
if (e instanceof Error || typeof e === 'string') {
this.logger.error('Error importing custom emojis:', e as Error);
}
this.logger.error(`Error importing custom emojis: ${renderInlineError(e)}`);
throw e;
}