mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-12-03 01:23:31 +01:00
Add missing error handlers on stream pipelines
- AnonymizedFile.anonymizedContent(): propagate content errors to the anonymizer so callers see the failure instead of hanging. - AnonymizedFile.send() local path: add error handler on the anonymizer transform between content and response pipes. - S3.send(): handle errors on the S3 body stream to avoid unhandled emits crashing the process. - S3.archive() / FileSystem.archive(): propagate read-stream errors to the file transformer so archiver sees the failure. - Add frontend translations for new error codes.
This commit is contained in:
4 files changed
+22
-8
No files matched your search
@@ -269,6 +269,7 @@ export default class AnonymizedFile {
|
||||
if (!config.STREAMER_ENTRYPOINT) {
|
||||
// collect the content locally
|
||||
const content = await this.content();
|
||||
content.on("error", (err) => anonymizer.destroy(err));
|
||||
return content.pipe(anonymizer);
|
||||
}
|
||||
|
||||
@@ -412,6 +413,7 @@ export default class AnonymizedFile {
|
||||
content
|
||||
.on("error", handleStreamError)
|
||||
.pipe(anonymizer)
|
||||
.on("error", handleStreamError)
|
||||
.pipe(res)
|
||||
.on("error", handleStreamError)
|
||||
.on("finish", () => {
|
||||
|
||||
Reference in new issue
Block a user