We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The LocalLambdaServer used for testing does not report errors to the caller correctly.
LambdaRuntime
curl
cd Examples/APIGateway LOG_LEVEL=trace swift run
In another terminal, send an invalid payload:
curl --header 'Content-Type: application/json' --data "{}" --verbose http://127.0.0.1:7000/invoke
APIGateway example
swift-aws-lambda-runtime
main
n/a
Diagnostic
Server trace:
2025-02-27T17:36:12+0100 debug LambdaRuntime : [AWSLambdaRuntimeCore] LambdaRuntime initialized 2025-02-27T17:36:12+0100 info LocalServer : host="127.0.0.1" port=7000 [AWSLambdaRuntimeCore] Server started and listening 2025-02-27T17:36:12+0100 trace LambdaRuntime : lambda_ip=127.0.0.1 lambda_port=7000 [AWSLambdaRuntimeCore] Connection to control plane created 2025-02-27T17:36:12+0100 trace LocalServer : [AWSLambdaRuntimeCore] Handling a new connection 2025-02-27T17:36:12+0100 trace LocalServer : URI=GET /2018-06-01/runtime/invocation/next [AWSLambdaRuntimeCore] Processing request 2025-02-27T17:36:12+0100 trace LocalServer : [AWSLambdaRuntimeCore] /next waiting for /invoke 2025-02-27T17:36:38+0100 trace LocalServer : [AWSLambdaRuntimeCore] Handling a new connection 2025-02-27T17:36:38+0100 trace LocalServer : Body={} URI=POST /invoke [AWSLambdaRuntimeCore] Processing request 2025-02-27T17:36:38+0100 trace LocalServer : requestID=544640702971583 [AWSLambdaRuntimeCore] /invoke received invocation 2025-02-27T17:36:38+0100 trace LocalServer : requestId=544640702971583 [AWSLambdaRuntimeCore] /next retrieved invocation 2025-02-27T17:36:38+0100 trace LocalServer : requestId=544640702971583 [AWSLambdaRuntimeCore] Writing response 2025-02-27T17:36:38+0100 trace LocalServer : Body={"errorType":"FunctionError","errorMessage":"keyNotFound(CodingKeys(stringValue: \"version\", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: \"No value associated with key CodingKeys(stringValue: \\\"version\\\", intValue: nil) (\\\"version\\\").\", underlyingError: nil))"} URI=POST /2018-06-01/runtime/invocation/544640702971583/error [AWSLambdaRuntimeCore] Processing request 2025-02-27T17:36:38+0100 trace LocalServer : requestId= [AWSLambdaRuntimeCore] Writing response 2025-02-27T17:36:38+0100 trace LambdaRuntime : [AWSLambdaRuntimeCore] Close lambda runtime client 2025-02-27T17:36:38+0100 trace LocalServer : [AWSLambdaRuntimeCore] Done handling the connection
Client Trace
curl --header 'Content-Type: application/json' --data "{}" --verbose http://127.0.0.1:7000/invoke 130 ↵ * Trying 127.0.0.1:7000... * Connected to 127.0.0.1 (127.0.0.1) port 7000 > POST /invoke HTTP/1.1 > Host: 127.0.0.1:7000 > User-Agent: curl/8.7.1 > Accept: */* > Content-Type: application/json > Content-Length: 2 > * upload completely sent off: 2 bytes [BLOCKED - CURL DOES NOT RETURN]
The text was updated successfully, but these errors were encountered:
[TestServer] Fix 488 and add simple test lambda (#489)
03876f6
Fixes: #488
sebsto
Successfully merging a pull request may close this issue.
Expected behavior
The LocalLambdaServer used for testing does not report errors to the caller correctly.
LambdaRuntime
and forward it to the clientActual behavior
curl
client stays blocked.Steps to reproduce
In another terminal, send an invalid payload:
If possible, minimal yet complete reproducer code (or URL to code)
APIGateway example
What version of this project (
swift-aws-lambda-runtime
) are you using?main
Swift version
n/a
Amazon Linux 2 docker image version
n/a
Diagnostic
Diagnostic
Server trace:
Client Trace
The text was updated successfully, but these errors were encountered: