summaryrefslogtreecommitdiff
path: root/packages/backend/src/misc/fastify-reply-error.ts
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-05-22 12:27:54 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-06-06 22:20:17 -0400
commit2cba0ada3cdf6b7ee37fa5c0b54134160be657a9 (patch)
tree38f6b59f7c60eda90677bc178974f71c877afe0d /packages/backend/src/misc/fastify-reply-error.ts
parentrender error cause in render-inline-error.ts (diff)
downloadsharkey-2cba0ada3cdf6b7ee37fa5c0b54134160be657a9.tar.gz
sharkey-2cba0ada3cdf6b7ee37fa5c0b54134160be657a9.tar.bz2
sharkey-2cba0ada3cdf6b7ee37fa5c0b54134160be657a9.zip
more use of identifiable errors, improvements to inner error rendering, and more heuristics for is-retryable-error
Diffstat (limited to 'packages/backend/src/misc/fastify-reply-error.ts')
-rw-r--r--packages/backend/src/misc/fastify-reply-error.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/backend/src/misc/fastify-reply-error.ts b/packages/backend/src/misc/fastify-reply-error.ts
index e6c4e78d2f..03109e8b96 100644
--- a/packages/backend/src/misc/fastify-reply-error.ts
+++ b/packages/backend/src/misc/fastify-reply-error.ts
@@ -8,8 +8,8 @@ export class FastifyReplyError extends Error {
public message: string;
public statusCode: number;
- constructor(statusCode: number, message: string) {
- super(message);
+ constructor(statusCode: number, message: string, cause?: unknown) {
+ super(message, cause ? { cause } : undefined);
this.message = message;
this.statusCode = statusCode;
}