| 387 | } |
| 388 | |
| 389 | static 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 | |
| 408 | AWS_LAMBDA_RUNTIME_API |
| 409 | void run_handler(std::function<invocation_response(invocation_request const&)> const& handler) |
no test coverage detected