Skip to content

Commit 9591b15

Browse files
authored
fix: Add error message check for CF API errors
If there isn't an error message, then they don't want to say what's wrong, so we better not report about it either.
1 parent 388b282 commit 9591b15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CFLookup/Jobs/StoreCFApiProjects.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public async static Task RunAsync(PerformContext context, IJobCancellationToken
5151

5252
token.ThrowIfCancellationRequested();
5353

54-
if (modList.Error != null && modList.Error.ErrorCode != 404)
54+
if (modList.Error != null && modList.Error.ErrorCode != 404 && !string.IsNullOrWhiteSpace(modList.Error.ErrorMessage))
5555
{
5656
// No-op for now, maybe Discord logs later
5757
await SendDiscordErrorNotification(scope, $"The CF API threw an error at me: **{modList.Error.ErrorCode}**: {modList.Error.ErrorMessage}");
@@ -330,4 +330,4 @@ private async static Task<bool> ExecuteBatchWithRetries(NpgsqlBatch batch, int r
330330
return false;
331331
}
332332
}
333-
}
333+
}

0 commit comments

Comments
 (0)