Pass the MsgId to the error_fun, which is required for proper handling