awslabs / awslabs/aws-lambda-cpp
invocation_response::failure does not work with HTTP API Gateway ?
- Linguagem predominante
- C++
- Estrelas
- 465
- Forks
- 98
- Merge médio
- 12h 47min
- PRs com merge (30d)
- 3
Descrição
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!
Guia de contribuição
Direção de pesquisa
Comece rastreando invocation_response::failure através de run_handler e compare seu comportamento com invocation_response::success quando chamado por meio do HTTP API Gateway. Reproduza o handler de exemplo usando o runtime C++ do Amazon Linux indicado e, em seguida, determine se o HTTP 500 observado é esperado ou identifica uma falha do runtime; o trabalho estará concluído quando o comportamento estiver explicado e verificado.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- aws, cpp
- Domínio
- api, backend
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 35/100