merge: Fix a few more error logging sites (!1181)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1181 Approved-by: Marie <github@yuugi.dev> Approved-by: dakkar <dakkar@thenautilus.net>
This commit is contained in:
commit
07959b4a97
3 changed files with 5 additions and 6 deletions
|
|
@ -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:', e instanceof Error ? e : new Error(e as string));
|
||||
this.logger.error(`Error creating Person ${uri}: ${renderInlineError(e)}`);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
@ -777,7 +777,7 @@ export class ApPersonService implements OnModuleInit, OnApplicationShutdown {
|
|||
return result;
|
||||
})
|
||||
.catch(e => {
|
||||
this.logger.info(`Processing Move Failed @${updated.username}@${updated.host} (${uri})`, { stack: e });
|
||||
this.logger.info(`Processing Move Failed @${updated.username}@${updated.host} (${uri}): ${renderInlineError(e)}`);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ import { getIpHash } from '@/misc/get-ip-hash.js';
|
|||
import { isRetryableError } from '@/misc/is-retryable-error.js';
|
||||
import * as Acct from '@/misc/acct.js';
|
||||
import { isNote } from '@/core/activitypub/type.js';
|
||||
import { renderInlineError } from '@/misc/render-inline-error.js';
|
||||
import type { FastifyRequest, FastifyReply } from 'fastify';
|
||||
|
||||
export type LocalSummalyResult = SummalyResult & {
|
||||
|
|
@ -260,7 +261,7 @@ export class UrlPreviewService {
|
|||
|
||||
return reply.code(200).send(summary);
|
||||
} catch (err) {
|
||||
this.logger.warn(`Failed to get preview of ${url} for ${lang}: ${err}`);
|
||||
this.logger.warn(`Failed to get preview of ${url} for ${lang}: ${renderInlineError(err)}`);
|
||||
|
||||
reply.header('Cache-Control', 'max-age=3600');
|
||||
return reply.code(422).send({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue