Skip to content

Commit 4ea880f

Browse files
Fix error codes returned from GetTimeFromServer() (#615)
* Fix functional tests. Resolves: OLPEDGE-1494 Signed-off-by: Serhii Lozynskyi <[email protected]>
1 parent 5cce1f1 commit 4ea880f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

olp-cpp-sdk-authentication/src/AuthenticationClient.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ client::CancellationToken AuthenticationClient::Impl::SignInClient(
280280
auto time_callback = [=](TimeResponse response) mutable {
281281
if (!response.IsSuccessful()) {
282282
callback(AuthenticationError(
283-
static_cast<int>(response.GetError().GetErrorCode()),
283+
static_cast<int>(response.GetError().GetHttpStatusCode()),
284284
response.GetError().GetMessage()));
285285
return;
286286
}
@@ -426,7 +426,7 @@ client::CancellationToken AuthenticationClient::Impl::GetTimeFromServer(
426426
[callback, payload](const http::NetworkResponse& network_response) {
427427
if (network_response.GetStatus() != http::HttpStatusCode::OK) {
428428
callback(
429-
client::ApiError(network_response.GetStatus()));
429+
client::ApiError(network_response.GetStatus(), network_response.GetError()));
430430
return;
431431
}
432432

0 commit comments

Comments
 (0)