awslabs / awslabs/aws-lambda-cpp

invocation_response::failure does not work with HTTP API Gateway ?

未關閉
#117 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
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!

貢獻指南

開啟貢獻指南

研究方向

首先追蹤 invocation_response::failure 經過 run_handler 的呼叫流程,並將其透過 HTTP API Gateway 呼叫時的行為與 invocation_response::success 進行比較。使用所述的 Amazon Linux C++ runtime 重現範例 handler,然後判斷觀察到的 HTTP 500 是預期行為,還是表示 runtime 失敗;當行為獲得解釋並驗證後即完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
aws, cpp
領域
api, backend
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。