Advanced Usage Error Handling After perform any operations, if there are any error happened, GORM will set it to *DB's Error field if err := db.Where("name = ?", "jinzhu").First(&user).Error; err != nil { // error handling... } // If there are more than one error happened, get all of them with `GetErrors`, it returns `[]error` db.First(&user).Limit(10).Find(&users).GetErrors() // Check if returns