mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-09 09:20:54 +00:00
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
08038e65ab
commit
37309e1718
@ -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)
|
||||
|
@ -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 })
|
||||
|
Loading…
Reference in New Issue
Block a user