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

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov 2025-05-21 15:41:16 +07:00 committed by GitHub
parent 08038e65ab
commit 37309e1718
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -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)

View File

@ -239,6 +239,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 })