Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 512bb07

Browse files
authored
Downgrade error to warning when retrying because of message too large (#3224)
1 parent db1e489 commit 512bb07

File tree

1 file changed

+4
-1
lines changed
  • src/ApiService/ApiService/onefuzzlib

1 file changed

+4
-1
lines changed

src/ApiService/ApiService/onefuzzlib/Queue.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,18 @@ public async Task<bool> QueueObject<T>(string name, T obj, StorageType storageTy
6363
try {
6464
return await QueueObjectInternal(obj, queueClient, serializerOptions, visibilityTimeout, timeToLive);
6565
} catch (Exception ex) {
66-
_log.LogError(ex, "Failed to queue message in {QueueName}", name);
6766
if (IsMessageTooLargeException(ex) &&
6867
obj is ITruncatable<T> truncatable) {
68+
_log.LogWarning(ex, "Message too large in {QueueName}", name);
69+
6970
obj = truncatable.Truncate(1000);
7071
try {
7172
return await QueueObjectInternal(obj, queueClient, serializerOptions, visibilityTimeout, timeToLive);
7273
} catch (Exception ex2) {
7374
_log.LogError(ex2, "Failed to queue message in {QueueName} after truncation", name);
7475
}
76+
} else {
77+
_log.LogError(ex, "Failed to queue message in {QueueName}", name);
7578
}
7679
return false;
7780
}

0 commit comments

Comments
 (0)