Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Sources/AWSLambdaRuntime/LambdaRuntime.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,15 @@ public final class LambdaRuntime<Handler>: Sendable where Handler: StreamingLamb
} catch {
// catch top level errors that have not been handled until now
// this avoids the runtime to crash and generate a backtrace
self.logger.error("LambdaRuntime.run() failed with error", metadata: ["error": "\(error)"])
if let error = error as? LambdaRuntimeError,
error.code != .connectionToControlPlaneLost
{
// if the error is a LambdaRuntimeError but not a connection error,
// we rethrow it to preserve existing behaviour
self.logger.error("LambdaRuntime.run() failed with error", metadata: ["error": "\(error)"])
throw error
} else {
self.logger.trace("LambdaRuntime.run() connection lost")
}
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/performance_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ error() { printf -- "** ERROR: %s\n" "$*" >&2; }
fatal() { error "$@"; exit 1; }

export HOST=127.0.0.1
export PORT=7000
export PORT=7777
export AWS_LAMBDA_RUNTIME_API="$HOST:$PORT"
export LOG_LEVEL=error # important, otherwise log becomes a bottleneck

Expand Down
Loading