Skip to content

Commit 9985194

Browse files
fix(audience): narrow BuildPayload catch to IOException
Addresses review feedback on PR #691. The previous catch (Exception) in BuildPayload swallowed every failure as if it were the expected file-disappeared race. Permissions errors (UnauthorizedAccessException) and similar non-IO faults were silently dropped, masking real problems. Narrowing to IOException keeps the file-disappeared / locked / path- gone cases skipped — which is what the retry loop needs — while letting genuinely broken states propagate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c9d301c commit 9985194

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Packages/Audience/Runtime/Transport/HttpTransport.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,11 @@ private static string BuildPayload(IReadOnlyList<string> paths)
192192
sb.Append(json);
193193
count++;
194194
}
195-
catch (Exception)
195+
catch (IOException)
196196
{
197-
// File disappeared between ReadBatch and now — skip it.
197+
// File disappeared, locked, or path vanished between ReadBatch
198+
// and now — skip it. Non-IO errors like UnauthorizedAccessException
199+
// indicate real problems and are allowed to propagate.
198200
}
199201
}
200202

0 commit comments

Comments
 (0)