I just found that in GORM, the transaction commit might return error, like:
tx := db.begin() // do somthing here err := tx.Commit().Error
Als