Skip to content

Commit 1399f18

Browse files
committed
report the error to the continuation
1 parent 02821fe commit 1399f18

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/AWSLambdaRuntimeCore/Lambda+LocalServer.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ extension Lambda {
5555
// this call will return when the server calls continuation.resume()
5656
try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<Void, any Error>) in
5757
group.addTask {
58-
try await LambdaHttpServer(invocationEndpoint: invocationEndpoint).start(continuation: continuation)
58+
do {
59+
try await LambdaHttpServer(invocationEndpoint: invocationEndpoint).start(continuation: continuation)
60+
} catch {
61+
continuation.resume(throwing: error)
62+
}
5963
}
6064
}
6165
// now that server is started, run the Lambda function itself

0 commit comments

Comments
 (0)