Skip to content

Commit 22daf71

Browse files
committed
Enhance Telegram Client error logging
1 parent 2e902aa commit 22daf71

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

flights-notification-lambda/src/main/java/project/vilsoncake/flightsnotificationlambda/processors/FlightStatusChangeNotificationTypeProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ public void process() {
121121
notification, currentFlight);
122122
} catch (TelegramClient.TelegramClientException e) {
123123
log.error(
124-
"Failed to send status change notification for flight {} to user {}: {}",
124+
"Failed to send status change notification for flight {} to user {}",
125125
notification.getScheduledFlight().getRowId(),
126126
notification.getUser().getUsername(),
127-
e.getMessage());
127+
e);
128128
}
129129
}
130130

flights-notification-lambda/src/main/java/project/vilsoncake/flightsnotificationlambda/processors/ScheduledFlightsNotificationTypeProcessor.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,7 @@ private void notifyUsers(
114114
scheduledFlightsNotificationSender.notifyScheduledFlights(user, userFilteredResponse);
115115
} catch (TelegramClient.TelegramClientException e) {
116116
log.error(
117-
"Failed to send scheduled flights notification to user {}: {}",
118-
user.getUsername(),
119-
e.getMessage());
117+
"Failed to send scheduled flights notification to user {}", user.getUsername(), e);
120118
}
121119
}
122120
}

0 commit comments

Comments
 (0)