Add hook to notify plugins about message sending errors