From 24a149ff881a3b43545409c369011a7d1a917863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isaac=20Rold=C3=A1n?= Date: Mon, 16 Dec 2024 15:37:32 +0100 Subject: [PATCH] Catch errors when building functions --- packages/app/src/cli/services/build/extension.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/app/src/cli/services/build/extension.ts b/packages/app/src/cli/services/build/extension.ts index 2b0258b92e..a6aa0920f4 100644 --- a/packages/app/src/cli/services/build/extension.ts +++ b/packages/app/src/cli/services/build/extension.ts @@ -186,6 +186,9 @@ export async function buildFunctionExtension( await touchFile(bundlePath) await writeFile(bundlePath, base64Contents) } + } catch (error) { + const errorMessage = (error as Error).message ?? 'Unknown error occurred' + throw new AbortError('Failed to build function.', errorMessage) } finally { await releaseLock() }