In beforeUpdate lifecycle mehod I'm throwing an error based on some condition. Even though it throws an error it still updates the entry

Maybe this thread can help you