Skip to content

Commit

Permalink
Improve log clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
Citrinate committed Mar 15, 2024
1 parent 4ccd620 commit e16c549
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions BoosterManager/Boosters/BoosterPageResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ internal BoosterPageResponse(Bot bot, IDocument? boosterPage) {

MatchCollection gooAmounts = Regex.Matches(boosterPage.Source.Text, "(?<=parseFloat\\( \")[0-9]+");
Match info = Regex.Match(boosterPage.Source.Text, "\\[\\{\"[\\s\\S]*\"}]");

if (!info.Success || (gooAmounts.Count != 3)) {
Bot.ArchiLogger.LogGenericError(string.Format(Strings.ErrorParsingObject, boosterPage));

Expand All @@ -38,11 +39,10 @@ internal BoosterPageResponse(Bot bot, IDocument? boosterPage) {
IEnumerable<Steam.BoosterInfo>? enumerableBoosters;
try {
enumerableBoosters = JsonSerializer.Deserialize<IEnumerable<Steam.BoosterInfo>>(info.Value);
} catch (JsonException ex) {
Bot.ArchiLogger.LogGenericError(ex.Message);

throw new Exception();
} catch (JsonException) {
throw;
}

if (enumerableBoosters == null) {
Bot.ArchiLogger.LogNullError(enumerableBoosters);

Expand Down
2 changes: 1 addition & 1 deletion BoosterManager/Boosters/BoosterQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private async Task Run() {
}

if (!await UpdateBoosterInfos().ConfigureAwait(false)) {
Bot.ArchiLogger.LogGenericError("Failed to update booster information");
Bot.ArchiLogger.LogGenericError("Failed to update booster information, will retry in 1 minute");
UpdateTimer(DateTime.Now.AddMinutes(1));

return;
Expand Down

0 comments on commit e16c549

Please sign in to comment.