mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-12 20:57:45 +02:00
UBERF-10383 Ignore premature close errors in datalake (#8743)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user