A more proper fix for catch socket lose error (#6036)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-07-10 14:22:57 +07:00 committed by GitHub
parent 5d948fe3a7
commit 097c9d97fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,7 +47,7 @@ export function processRequest (
context.measure('deserialize', ed - st)
handleRequest(context, session, cs, request, workspaceId)
} catch (err: any) {
if (err.message === 'Data read, but end of buffer not reached 123') {
if (((err.message as string) ?? '').includes('Data read, but end of buffer not reached')) {
// ignore it
} else {
throw err