From 885ae8c0bf9b55972d41eafa0fe36d9b5225ed45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20S=2E=20Ga=C3=9Fmann?= Date: Thu, 18 Jan 2024 21:38:19 +0100 Subject: [PATCH] fix: explicitly error out on unknown chunk parts --- lib/browser/api/protocol.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/browser/api/protocol.ts b/lib/browser/api/protocol.ts index 3c24199a4009a..0bdec72983327 100644 --- a/lib/browser/api/protocol.ts +++ b/lib/browser/api/protocol.ts @@ -80,6 +80,8 @@ function convertToRequestBody (uploadData: ProtocolRequest['uploadData']): Reque // knowledge of the `Session` associated with the current request by // always pulling `Blob` data out of the default `Session`. controller.enqueue(await session.defaultSession.getBlobData(chunk.blobUUID)); + } else { + throw new Error(`Unknown upload data chunk type: ${chunk.type}`); } } }