awslabs / awslabs/aws-lambda-cpp
invocation_response::failure does not work with HTTP API Gateway ?
- 主要语言
- C++
- 星标
- 465
- 派生
- 98
- 平均合并
- 12 小时 47 分钟
- 30 天内合并 PR
- 3
描述
I'm using the HTTP API Gateway, my c++ runtime is built with amazonlinux:latest in a docker image.
All responses that return with invocation_response::failure return an Error 500, Internal Server Error.
```
#include
using namespace aws::lambda_runtime;
static invocation_response my_handler(invocation_request const& req)
{
return invocation_response::failure("error message here"/*error_message*/, "error type here" /*error_type*/);
}
int main()
{
run_handler(my_handler);
return 0;
}
```
However, when I use invocation_response::success, the message arrives on my requesting client, but I ofc. can only send json objects back. (Anyone got an idea why that is ?)
I read everything google found and digged through all kinds of files and aws docus, I could not find out where the problem is. Could someone please give me a hint if the args have to match some specific ones or what I am doing wrong ?
Thanks!
贡献指南
调研方向
Start by tracing invocation_response::failure through run_handler and compare its behavior with invocation_response::success when called through HTTP API Gateway. Reproduce the sample handler using the stated Amazon Linux C++ runtime, then determine whether the observed HTTP 500 is expected or identifies a runtime failure; done means the behavior is explained and verified.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- aws, cpp
- 领域
- api, backend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100