awslabs / awslabs/aws-lambda-cpp

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

Abierto
#117 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C++
Estrellas
465
Forks
98
Merge medio
12 h 47 min
PR fusionados (30 d)
3

Descripción

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!

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.