Skip to content

Commit

Permalink
Fix compilation due to wrong )
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-hb authored Feb 10, 2024
1 parent ebd1ade commit a84d37c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/gintx/neo4j.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,23 @@ func BuildNeo4JTransactionMiddleware(sessionConfig neo4j.SessionConfig, driver n

err := tx.Rollback(ctx)
if err != nil {
logrus.WithField("error", err)).Error("Cannot rollback neo4j transaction.")
logrus.WithField("error", err).Error("Cannot rollback neo4j transaction.")
return
}
} else if ctx.Writer.Status() >= http.StatusInternalServerError {
logrus.Debug("Starting neo4j rollback due to internal server error status code.")

err := tx.Rollback(ctx)
if err != nil {
logrus.WithField("error", err)).Error("Cannot rollback neo4j transaction.")
logrus.WithField("error", err).Error("Cannot rollback neo4j transaction.")
return
}
} else {
logrus.Debug("Starting neo4j commit.")

err := tx.Commit(ctx)
if err != nil {
logrus.WithField("error", err)).Error("Cannot commit neo4j transaction.")
logrus.WithField("error", err).Error("Cannot commit neo4j transaction.")
return
}
}
Expand Down

0 comments on commit a84d37c

Please sign in to comment.