UBERF-10383 Ignore premature close errors in datalake (#8743)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2025-04-28 20:57:32 +07:00
committed by GitHub
parent 0b73f61106
commit 99303350c9
2 changed files with 8 additions and 0 deletions
@@ -85,6 +85,10 @@ export async function handleBlobGet (
pipeline(blob.body, res, (err) => {
if (err != null) {
// ignore abort errors to avoid flooding the logs
if (err.name === 'AbortError' || err.code === 'ERR_STREAM_PREMATURE_CLOSE') {
return
}
const error = err instanceof Error ? err.message : String(err)
ctx.error('error writing response', { workspace, name, error })
Analytics.handleError(err)
@@ -255,6 +255,10 @@ async function writeFileToResponse (ctx: MeasureContext, path: string, res: Resp
pipeline(stream, res, (err) => {
if (err != null) {
// ignore abort errors to avoid flooding the logs
if (err.name === 'AbortError' || err.code === 'ERR_STREAM_PREMATURE_CLOSE') {
return
}
Analytics.handleError(err)
const error = err instanceof Error ? err.message : String(err)
ctx.error('error writing response', { error })