fix: preserve streamer error semantics for cache probes

This commit is contained in:
Codex committed 2026-11-10 12:55:55 +00:00
1 parent 07458f536a
commit 0abbe34aed
2 files changed
+36

No files matched your search

+9
View File
@@ -484,6 +484,15 @@ export default class AnonymizedFile {
res.once("close", cancel);
if (res.destroyed || res.writableEnded) cancel();
try { return await probeStreamerCache(url, payload, headers, cancellation.signal); }
catch (err) {
headersDone(true);
const { error } = streamerErrorToAnonymous(err as Error & {
response?: { statusCode?: number; body?: unknown };
}, { repoId: this.repository.repoId, filePath: this.anonymizedPath });
void notifyOwnerAccessProblem(this.repository.owner.id, error, { kind: "repository", id: String(this.repository.model._id) });
error.value = this;
throw error;
}
finally { res.removeListener("close", cancel); }
};
const cached = await probe();