Sadly, the enemy attack is resolved before your sentinel attack comes through.
Besides that, since that specific sentinel attack is not an opportunity attack (but just a random attack made with your reaction), it is not eligible for warcaster so shocking grasp is a no-go.