Skip to content

Commit

Permalink
Merge pull request #5115 from Shopify/12-16-catch_errors_when_buildin…
Browse files Browse the repository at this point in the history
…g_functions

Catch errors when building functions
  • Loading branch information
isaacroldan authored Dec 16, 2024
2 parents 228e0a4 + 24a149f commit 720ad9c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/app/src/cli/services/build/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 720ad9c

Please sign in to comment.