Update by JPA native query

I am using spring boot repository with native query. While I am trying to update few fields by query and supply wrong values it is not throwing any exception. here is my code,

@Modifying(clearAutomatically = true)
@Query(value = "update tbl_user set is_phone_Verified=true, mobile_verification_otp='XXX', updated_At=:updatedAt where " +
        "phone_number=:registeredMobile and " +
        "mobile_verification_otp=:phoneVerificationOtp", nativeQuery = true)
void updateMobileVerified(@Param("registeredMobile") String registeredMobile,
                         @Param("phoneVerificationOtp") String phoneVerificationOtp,
                         @Param("updatedAt") Date updatedAt);

Now, the issue is if I supply even wrong otp value, it is not throwing any exception. From service I am calling this method. and if there is no exception then I am returning true. Please find the service method.

@Override
public Boolean mobileVerification(String registeredMobile, String phoneVerificationOtp) {
    try{
        Date date = new Date();
        userRepository.updateMobileVerified(registeredMobile,phoneVerificationOtp, date);
        return true;
    } catch(Exception e) {
        return false;
    }
}

Can someone please suggest me some way how can I determine if the update is successful.

Thanks.


If you would like to determine whether any rows were updated, the updateMobileVerified method can be defined to return int instead of void to indicate the number of rows updated