Skip to content

Commit

Permalink
Fix endpoint resolution error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
sbera87 committed Jan 29, 2025
1 parent 14fd160 commit 8e16c7a
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,15 @@ void AwsSmithyClientBase::MakeRequestAsync(Aws::AmazonWebServiceRequest const* c
auto epResolutionOutcome = this->ResolveEndpoint(std::move(epParams), std::move(endpointCallback));
if (!epResolutionOutcome.IsSuccess())
{
auto resolutionOutcome = ResolveEndpointOutcome(Aws::Client::AWSError<CoreErrors>{CoreErrors::ENDPOINT_RESOLUTION_FAILURE, epResolutionOutcome..GetError().GetExceptionName(), epResolutionOutcome..GetError().GetMessage()});
auto epOutcome = ResolveEndpointOutcome(Aws::Client::AWSError<Aws::Client::CoreErrors>{
Aws::Client::CoreErrors::ENDPOINT_RESOLUTION_FAILURE,
epResolutionOutcome.GetError().GetExceptionName(),
epResolutionOutcome.GetError().GetMessage(),
false});

pExecutor->Submit([resolutionOutcome, responseHandler]() mutable
pExecutor->Submit([epOutcome, responseHandler]() mutable
{
responseHandler(std::move(resolutionOutcome));
responseHandler(std::move(epOutcome));
} );
return;
}
Expand Down

0 comments on commit 8e16c7a

Please sign in to comment.