diff --git a/SwiftParcel.Services.OrdersCreator/src/SwiftParcel.Services.OrdersCreator/Services/Clients/CouriersServiceClient.cs b/SwiftParcel.Services.OrdersCreator/src/SwiftParcel.Services.OrdersCreator/Services/Clients/CouriersServiceClient.cs index 5369326..d73fefd 100644 --- a/SwiftParcel.Services.OrdersCreator/src/SwiftParcel.Services.OrdersCreator/Services/Clients/CouriersServiceClient.cs +++ b/SwiftParcel.Services.OrdersCreator/src/SwiftParcel.Services.OrdersCreator/Services/Clients/CouriersServiceClient.cs @@ -23,10 +23,10 @@ public async Task GetBestAsync() { // the most potential resource of the issues to resolve in the api connection var couriers = await _httpClient.GetAsync>($"{_url}/courier"); - var bestCourier = vehicles?.Items?.FirstOrDefault(); + var bestCourier = couriers?.Items?.FirstOrDefault(); if (bestCourier is null) { - throw new InvalidOperationException("The best vehicle was not found."); + throw new InvalidOperationException("The best courier was not found."); } return bestCourier;