MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / handle_post_outcome

Function handle_post_outcome

src/runtime.cpp:389–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387}
388
389static bool handle_post_outcome(runtime::post_outcome const& o, std::string const& request_id)
390{
391 if (o.is_success()) {
392 return true;
393 }
394
395 if (o.get_failure() == aws::http::response_code::REQUEST_NOT_MADE) {
396 logging::log_error(LOG_TAG, "Failed to send HTTP request for invocation %s.", request_id.c_str());
397 return false;
398 }
399
400 logging::log_info(
401 LOG_TAG,
402 "HTTP Request for invocation %s was not successful. HTTP response code: %d.",
403 request_id.c_str(),
404 static_cast<int>(o.get_failure()));
405 return false;
406}
407
408AWS_LAMBDA_RUNTIME_API
409void run_handler(std::function<invocation_response(invocation_request const&)> const& handler)

Callers 1

run_handlerFunction · 0.85

Calls 3

log_errorFunction · 0.85
log_infoFunction · 0.85
is_successMethod · 0.45

Tested by

no test coverage detected