From ace5152a0e48f1e071b40e9f11bcc7d7329bc491 Mon Sep 17 00:00:00 2001 From: bcoll Date: Tue, 7 Mar 2023 13:59:44 +0000 Subject: [PATCH] fixup! Add validation for internal R2 requests --- packages/tre/src/plugins/r2/errors.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/tre/src/plugins/r2/errors.ts b/packages/tre/src/plugins/r2/errors.ts index 77d1fe10f..42cd45ea9 100644 --- a/packages/tre/src/plugins/r2/errors.ts +++ b/packages/tre/src/plugins/r2/errors.ts @@ -24,12 +24,10 @@ enum CfCode { } export class R2Error extends HttpError { - v4Code: number; object?: R2Object; - constructor(status: number, message: string, v4Code: number) { - super(status, message); - this.v4Code = v4Code; + constructor(code: number, message: string, readonly v4Code: number) { + super(code, message); } toResponse() {