Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
rekby committed Jan 15, 2025
1 parent 4514e46 commit 2c0380e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/query/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2c0380e

Please sign in to comment.