summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/FileServerService.ts
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-03-16 12:37:46 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-06-06 22:20:16 -0400
commitce08bd1b425f14a1ca80287ca4cf43deeb32ea76 (patch)
treeb9c5e8a81b992174c3ec3fea4bc9b8b31fe7fd26 /packages/backend/src/server/FileServerService.ts
parentrender condensed errors when fetching following/followers/featured/outbox/emo... (diff)
downloadsharkey-ce08bd1b425f14a1ca80287ca4cf43deeb32ea76.tar.gz
sharkey-ce08bd1b425f14a1ca80287ca4cf43deeb32ea76.tar.bz2
sharkey-ce08bd1b425f14a1ca80287ca4cf43deeb32ea76.zip
reduce, clarify, and normalize more error messages
Diffstat (limited to 'packages/backend/src/server/FileServerService.ts')
-rw-r--r--packages/backend/src/server/FileServerService.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/backend/src/server/FileServerService.ts b/packages/backend/src/server/FileServerService.ts
index 4ef5539cff..2e3e8df7ea 100644
--- a/packages/backend/src/server/FileServerService.ts
+++ b/packages/backend/src/server/FileServerService.ts
@@ -32,6 +32,7 @@ import { getIpHash } from '@/misc/get-ip-hash.js';
import { AuthenticateService } from '@/server/api/AuthenticateService.js';
import { SkRateLimiterService } from '@/server/SkRateLimiterService.js';
import { Keyed, RateLimit, sendRateLimitHeaders } from '@/misc/rate-limit-utils.js';
+import { renderInlineError } from '@/misc/render-inline-error.js';
import type { FastifyInstance, FastifyRequest, FastifyReply, FastifyPluginOptions } from 'fastify';
const _filename = fileURLToPath(import.meta.url);
@@ -120,7 +121,7 @@ export class FileServerService {
@bindThis
private async errorHandler(request: FastifyRequest<{ Params?: { [x: string]: any }; Querystring?: { [x: string]: any }; }>, reply: FastifyReply, err?: any) {
- this.logger.error(`${err}`);
+ this.logger.error(`Unhandled error in file server: ${renderInlineError(err)}`);
reply.header('Cache-Control', 'max-age=300');