Error while fetching child table value

I want to fetch child table-phone_nos from Contact table into Customer doctype.
For that i have created a custom child table-custom phone with the same fields as in phone_nos and added it in customer doctype.

I used the below custom script,

frappe.ui.form.on('Customer', {
"refresh": function(frm) {
    frappe.model.with_doc("Contact", frm.doc.refresh, function() {
        var tabletransfer= frappe.model.get_doc("Contact", frm.doc.refresh);
        $.each(tabletransfer.phone_nos, function(index, row){
            var d = frm.add_child("Custom Phone");
            frm.refresh_field("Custom Phone");

I am getting the below error,

Kindly suggest to rectify this error.

Thanks in advance!

Apparently that message may mean a syntax error in your py whitelist method?

This thread Error : The resource you are looking for is not available gives tips to troubleshoot your case

Thank you , will refer the same for troubleshooting.