Manage error in patterns