Skip to content

Commit 1ee617b

Browse files
author
aligneddev
committed
error logging
1 parent 7826135 commit 1ee617b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/BikeTracking.Api/Application/Rides/WeatherLookupService.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,12 @@ ILogger<OpenMeteoWeatherLookupService> logger
132132
if (!response.IsSuccessStatusCode)
133133
{
134134
logger.LogWarning(
135-
"Open-Meteo lookup failed for rounded {LatitudeRounded},{LongitudeRounded} at {UtcHour} with status {StatusCode}",
135+
"Open-Meteo lookup failed for rounded {LatitudeRounded},{LongitudeRounded} at {UtcHour} with status {StatusCode}: {ResponseContent}",
136136
latRounded,
137137
lonRounded,
138138
dateTimeUtc,
139-
response.StatusCode
139+
response.StatusCode,
140+
await response.Content.ReadAsStringAsync(cancellationToken)
140141
);
141142

142143
// Cache failure for short period to avoid hammering API

0 commit comments

Comments
 (0)