Skip to content

Commit 9c2a418

Browse files
committed
fix: added missing throw error statement
1 parent 4ac474d commit 9c2a418

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/cdk/lib/example-function.MyFunction.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export const handler = async (event: unknown, context: Context): Promise<void> =
6161
} catch (err) {
6262
// Add the error as metadata
6363
subsegment.addError(err as Error, false);
64+
throw err;
6465
} finally {
6566
// Close subsegments (the AWS Lambda one is closed automatically)
6667
subsegment.close(); // (### MySubSegment)

0 commit comments

Comments
 (0)