We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe089c6 commit a1b5698Copy full SHA for a1b5698
packages/app/src/cli/services/build/extension.ts
@@ -186,7 +186,12 @@ export async function buildFunctionExtension(
186
await touchFile(bundlePath)
187
await writeFile(bundlePath, base64Contents)
188
}
189
- } catch (error) {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
190
+ } catch (error: any) {
191
+ const errors = error.errors ?? []
192
+ // If there is an `errors` array, it's an esbuild error, re-throw it directly.
193
+ if (errors.length) throw error
194
+
195
const errorMessage = (error as Error).message ?? 'Unknown error occurred'
196
throw new AbortError('Failed to build function.', errorMessage)
197
} finally {
0 commit comments