diff --git a/internal/query/session.go b/internal/query/session.go index 566878c84..3d77fe6cf 100644 --- a/internal/query/session.go +++ b/internal/query/session.go @@ -181,8 +181,9 @@ func (s *Session) Query( func (s *Session) setStatusFromError(err error) { switch { - case xerrors.IsTransportError(err) || - xerrors.IsOperationError(err, Ydb.StatusIds_SESSION_BUSY, Ydb.StatusIds_BAD_SESSION): + case xerrors.IsTransportError(err): + s.SetStatus(session.StatusError) + case xerrors.IsOperationError(err, Ydb.StatusIds_SESSION_BUSY, Ydb.StatusIds_BAD_SESSION): s.SetStatus(session.StatusError) case xerrors.IsOperationError(err, Ydb.StatusIds_BAD_SESSION): s.SetStatus(session.StatusClosed)