awslabs / awslabs/aws-lambda-cpp
invocation_response::failure does not work with HTTP API Gateway ?
- Langage dominant
- C++
- Étoiles
- 465
- Forks
- 98
- Merge moyen
- 12 h 47 min
- PR mergées (30 j)
- 3
Description
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!
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par suivre invocation_response::failure à travers run_handler et comparez son comportement à celui de invocation_response::success lorsqu’il est appelé via HTTP API Gateway. Reproduisez le handler d’exemple à l’aide du runtime C++ Amazon Linux indiqué, puis déterminez si le HTTP 500 observé est attendu ou s’il révèle un échec du runtime ; le travail est terminé lorsque le comportement est expliqué et vérifié.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- aws, cpp
- Domaine
- api, backend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100