Skip to content

Commit 7aa746f

Browse files
authored
[core] LocalServer - report the error to the continuation (#471)
fix #470
1 parent 02821fe commit 7aa746f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Sources/AWSLambdaRuntimeCore/Lambda+LocalServer.swift

+7-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,13 @@ 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(
60+
continuation: continuation
61+
)
62+
} catch {
63+
continuation.resume(throwing: error)
64+
}
5965
}
6066
}
6167
// now that server is started, run the Lambda function itself

0 commit comments

Comments
 (0)